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
<snippet> | |
<content><![CDATA[ | |
console.log( ${1} ); | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>cl</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> | |
</snippet> |
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
# count sloc of all *.js on root | |
find ./ -name "*.js" -exec cat '{}' \; | wc -l |
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
(function(exports){ | |
// your code goes here | |
exports.test = function(){ | |
return 'hello world' | |
}; | |
})(typeof exports === 'undefined'? this['mymodule']={}: exports); |
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
// See how your layout looks like. | |
* { background-color: rgba(255,0,0,.2); } | |
* * { background-color: rgba(0,255,0,.2); } | |
* * * { background-color: rgba(0,0,255,.2); } | |
* * * * { background-color: rgba(255,0,255,.2); } | |
* * * * * { background-color: rgba(0,255,255,.2); } | |
* * * * * * { background-color: rgba(255,255,0,.2); } |
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
#!/usr/bin/node | |
/** | |
* Trello task description: https://trello.com/jobs/developer | |
*/ | |
/** | |
* @function hash Create hash from string | |
* @param {String} str String to hash | |
* @return {Number} hash | |
*/ |
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
# sudo allows you to get proccesses you don't own | |
sudo lsof -n -i4TCP:$PORT | grep LISTEN |
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
/** | |
* When it was happend? | |
* https://github.com/zhukov/webogram/blob/master/app/js/lib/utils.js#L8 | |
* console.log(dT(), 'foo'); | |
* [17.567] foo | |
* console.log(dT(), 'bar'); | |
* [23.290] bar | |
*/ | |
var _logTimer = (new Date()).getTime(); |
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'; | |
/** | |
* Welcome to the Api module! | |
* This is wrapper of $http angular service for Seedr Backend. | |
* In .config we defined interceptor, for cheking statuses all of Seedr requests. | |
*/ | |
angular.module('Seedr.api', []) | |
/** | |
* @service Api |
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
" Just search by `/# ` to navigate between parts of the file | |
" # Behavior | |
set nocompatible | |
set nobackup | |
set noswapfile | |
set history=1000 " remember more commands and search history | |
" # UX | |
syntax enable | |
set title " Show the (partial) command as it’s being typed |
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
/** | |
* Check if `value` is a promise | |
* Future "native" ES6 promise you can just ckeck: | |
* value instanceof Promise | |
*/ | |
function check (value) { | |
return value && 'then' in value && typeof value.then == 'function'; | |
} |
OlderNewer