Skip to content

Instantly share code, notes, and snippets.

View d1buts's full-sized avatar
🎯

Dmytro Bushchuk d1buts

🎯
View GitHub Profile
@d1buts
d1buts / pre-commit.sh
Created December 17, 2018 15:51 — forked from jgoodall/pre-commit.sh
A git pre-commit hook for node.js projects to lint js files, run tests, and build docs
#!/bin/sh
#
# A git pre-commit hook for node.js projects to
# * lint JavaScript files with [jshint](https://github.com/jshint/jshint/)
# * run [mocha](http://visionmedia.github.com/mocha/) tests from npm, as defined in package.json
# * build docs (e.g. using docco or markdox), as defined in package.json
#
# package.json should have a scripts block that defines how to run tests and build docs:
# "scripts" : {
# "test": "./node_modules/mocha/bin/mocha -R spec"
export class SignalR {
constructor (AccessToken, DeviceId, listeners) {
this.$bus = Vue.prototype.$bus
this.url = api.signalR.connection()
this.AccessToken = AccessToken
this.DeviceId = DeviceId
this.prefixEventsEmitInvoke = 'to-signalR.invoke'
this.prefixEventsOnInvoke = 'from-signalR.invoke'
this.prefixEventsOnHubProxy = 'from-signalR.on'
this.listeners = listeners
@d1buts
d1buts / htaccess
Created April 3, 2017 07:06 — forked from jbutko/htaccess
.htaccess, #AngularJS, UI-Router: Configure Apache server to work with html5Mode
# this ensures support for pretty links even after page refresh (F5)
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]