This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Will call your click handler if the element is not disabled. | |
Usefull for legacy apps where elements such as anchor tags are used. | |
As these do not respect the disabled attribute. | |
Does not matter how element is disabled, angular, jQuery native or even devTools. | |
Should strongly consider using it outside the `ng` namesapce. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _XTAL_FREQ 4000000 | |
#include <pic16f688.h> | |
#include <xc.h> | |
// CONFIG | |
#pragma config FOSC = INTOSCIO // Oscillator Selection bits (INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN) | |
#pragma config WDTE = ON // Watchdog Timer Enable bit (WDT enabled) | |
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled) | |
#pragma config MCLRE = ON // MCLR Pin Function Select bit (MCLR pin function is MCLR) | |
#pragma config CP = OFF // Code Protection bit (Program memory code protection is disabled) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
let group = (arr, by) => arr.reduce((prev, cur) => { | |
let val = isFunction(by) ? by(cur) : cur[by]; | |
prev.hasOwnProperty(val) ? prev[val].push(cur) : prev[val] = [cur]; | |
return prev; | |
}, {}), | |
isFunction = (x) => Object.prototype.toString.call(x) === "[object Function]"; | |
module.exports = () => ({group, isFunction}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Variables: | |
$screen-size-small | |
$screen-size-medium | |
$screen-size-large | |
$grid-small-screen-width | |
$grid-medium-screen-width | |
$grid-large-screen-width | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin vendorPrefix($prop, $val) { | |
-webkit-#{$prop}: $val; | |
-moz-#{$prop}: $val; | |
-ms-#{$prop}: $val; | |
-o-#{$prop}: $val; | |
#{$prop}: $val; | |
} | |
/* | |
Use: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let promisify = (fn) => (...args) => | |
new Promise((rCB, eCB) => | |
fn(...args, (e, r) => { | |
if (e) | |
eCB(e); | |
else | |
rCB(r); | |
})); | |
promisify(sass.render({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.directive('ignoreDisabled', ['$exceptionHandler', ($exceptionHandler) => { | |
return { | |
restrict: 'A', | |
require: 'ngModel', | |
link: ($scope, elem, attr, ctrl) => { | |
if (!attr.hasOwnProperty('ngDisabled')) { | |
$exceptionHandler(new ReferenceError('Attempt to use ignoreDisabled on element without ngDisabled.')); | |
} else { | |
$scope.$watch(attr.ngDisabled, (val, oldVal) => { | |
if (val === true && val !== oldVal) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use stirct'; | |
const electron = require('electron'), | |
userDataPath = (electron.app || electron.remote.app).getPath('userData'), | |
path = require('path'), | |
fs = require('fs'); | |
class Store { | |
constructor(configName = '') { | |
// Probably want to implement error handling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
dist/ | |
yarn.lock | |
wwwroot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!window.Enumerator) { | |
window.Enumerator = function (c) { | |
this._c = Array.from(c); | |
this._index = 0; | |
} | |
window.Enumerator.prototype.atEnd = function () { | |
return this._index >= this._c.length - 1; | |
} | |
OlderNewer