This file contains hidden or 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
var express = require('express'), | |
// ... other packages | |
sass = require('node-sass'); | |
// ... | |
var app = express(); | |
// ... | |
// Commented this default express generator line: | |
// app.use(require('stylus').middleware(path.join(__dirname, 'public'))); | |
// |
This file contains hidden or 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
/** | |
* original: http://pastebin.com/mnznDg7q | |
* by @grumblerbear | |
* | |
* Пример: | |
* 1, ['сайт', 'сайта', 'сайтов'] | |
* Результат: | |
* 'сайт' | |
* | |
* Пример: |
This file contains hidden or 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
# Ignore everything in the root except the "wp-content" directory.. | |
/ | |
/wp-config.php | |
/local-config.php | |
/remote-config.php | |
!.gitignore | |
!wp-content | |
wp-includes | |
wp-admin | |
wp-snapshots |
This file contains hidden or 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
var data = {a: {b: 1}}; | |
var type = {l1: "a", l2: "b"}; | |
console.log("pos:", data[type.l1][type.l2]); |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am beshur on github. | |
* I am shu (https://keybase.io/shu) on keybase. | |
* I have a public key whose fingerprint is 65F7 5F9A D475 5021 D0A5 16FC 14A2 E7D5 F5A4 8746 | |
To claim this, I am signing this object: |
This file contains hidden or 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
// Simple HSB to HSL converter by Alexander Futekov (@futekov) | |
// http://www.sitepoint.com/hsb-colors-with-sass/ | |
// | |
@function hsb($h-hsb, $s-hsb, $b-hsb, $a: 1) { | |
@if $b-hsb == 0 { | |
@return hsla(0, 0, 0, $a) | |
} @else { | |
$l-hsl: ($b-hsb/2) * (2 - ($s-hsb/100)); | |
$s-hsl: ($b-hsb * $s-hsb) / if($l-hsl < 50, $l-hsl * 2, 200 - $l-hsl * 2); | |
@return hsla($h-hsb, $s-hsl, $l-hsl, $a); |
This file contains hidden or 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
// Go to menue: | |
// find->find in files | |
// Switch on reg_ex button | |
// Find: | |
^(.*)$ | |
// Where: | |
c:\your_folder\,*.php,*.phtml,*.js,*.inc,*.html, -*/folder_to_exclude/* | |
// Then click on the find button | |
// Be careful to not click on Replace!!! |
This file contains hidden or 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
#!/bin/sh | |
cd .. | |
grunt release | |
cd build | |
echo "compressing..." | |
tar -cf portal.tgz ../* --exclude=../node_modules --exclude=../tests/node_modules --exclude=../data --exclude=../config/local.json | |
echo "deploying to server" | |
scp -r portal.tgz root@server:/root/remote-folder/ | |
echo "updating sources" | |
ssh root@server " |
This file contains hidden or 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
var socketHelper = function() { | |
this.clientId = ""; | |
this.getClientId = function() { | |
return this.clientId; | |
} | |
this.address = "localhost"; |