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 background-rgba($r,$g,$b,$a) { | |
// To mimic this in Internet Explorer, you can use the proprietary filter | |
// property to create a gradient with the same start and end color, along | |
// with an alpha transparency value. | |
@if experimental-support-for-microsoft { | |
$color: ie_hex($r,$g,$b,$a); | |
$value: unquote("progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=##{$color},endColorstr=##{$color})"); | |
background-color: transparent\9; |
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
document.getElementsByTagName('button')[0].onclick = function () { | |
scrollTo(document.body, 0, 1250); | |
} | |
function scrollTo(element, to, duration) { | |
var start = element.scrollTop, | |
change = to - start, | |
currentTime = 0, | |
increment = 20; | |
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
Record Auto semicolon macro and bind shortcut to it: | |
1. Edit -> Macros -> Start Macro Recording | |
2. In the editor go to the end of line by pressing End | |
3. put semicolon ';' | |
4. Edit -> Macros -> Stop Macro Recording | |
5. Give a name, for example 'Auto semicolon' | |
6. Open settings (Ctrl + Alt + s), select Keymap | |
7. Expand Macros node | |
8. Select 'Auto semicolon', in the context menu choose Add Keyboard Shortcut | |
9. Set Ctrl + ; as First keystroke |
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
// file: index.js | |
var _ = require("lodash"); | |
var express = require("express"); | |
var bodyParser = require("body-parser"); | |
var jwt = require('jsonwebtoken'); | |
var passport = require("passport"); | |
var passportJWT = require("passport-jwt"); |
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
/* eslint-disable prefer-template */ | |
const path = require('path'); | |
const aliases = require('./aliases'); | |
// /////////////////////////////////////////////////////////////// | |
// ////////////////// PLUGINS //////////////////////////////// | |
// /////////////////////////////////////////////////////////////// | |
const commonPlugins = [ |
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
export function debounce<F extends Function>(func:F, wait:number):F { | |
let timeoutID:number; | |
if (!Number.isInteger(wait)) { | |
console.warn("Called debounce without a valid number") | |
wait = 300; | |
} | |
// conversion through any necessary as it wont satisfy criteria otherwise | |
return <any>function(this:any, ...args: any[]) { |