- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
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
#!/bin/bash | |
# Example usage: | |
# ./sgg.sh http://islands-components.incrop.lego-dev.dev.yandex-team.ru/ popup | |
GATHER_URL=${1:-https://lego-staging.dev.yandex-team.ru/islands-components/dev/} | |
BLOCK=$2 | |
DIR_MAIN=gemini/screens | |
DIR_DIFF=gemini-report/diff | |
IMG_DIFF=./current-diff.png |
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
var promise = require('promise'); | |
var punycode = require('./punycode.min'); | |
var smtpc = require("smtpc"); | |
var config = require("./config"); | |
exports.send_mail = function (to, topic, body) { | |
return new promise(function(resolve, reject){ | |
var _to = []; | |
for (var i = 0 ; i < to.length; i++) { | |
_to[i] = punycode.toASCII(to[i]); |
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
var reg = /\{\{(.+?)\}\}/gim; | |
var zz = 'hello {{name}} {{surname}}'.replace(reg, function(full, key){ | |
switch(key){ | |
case 'name': | |
return 'myName'; | |
case 'surname': | |
return 'mySurname' | |
} | |
}); |
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
exports.fastElements = function(obj) { | |
if (%HasFastSmiElements(obj)) { | |
console.log('Fast SMI elements'); | |
} | |
if (%HasFastSmiOrObjectElements(obj)) { | |
console.log('Fast SMI or Object elements'); | |
} | |
if (%HasFastObjectElements(obj)) { | |
console.log('Fast Object elements'); | |
} |
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(fn, cb){ | |
var a = fn(cb); | |
var b; | |
setTimeout(function(){ | |
b = fn(cb); | |
}, 100); | |
} | |
function Man(name, age){ | |
this.name = name; |
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
#!/bin/bash | |
REL_PATH=$(dirname $0) | |
cd $REL_PATH | |
env=$1 | |
CONFIG=$(cat container-config/env-$env.sh | base64) | |
# delete the old config | |
sed -e "s/{{config_data}}/''/g" container-config/config-template.yaml | kubectl delete -f - |
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
var hello = 'hello'; | |
var world = 'world'; | |
var mark = '!'; | |
var options = { | |
silent: true | |
}; | |
function greet(options, first, second){ | |
if (options.silent){ |
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
var getSources = function(name) { | |
var filename = name.substr(templateParams.htmlWebpackPlugin.files.publicPath.length); | |
return templateParams.compilation.assets[filename].source(); | |
} | |
templateParams.htmlWebpackPlugin.files.css.map(getSources) | |
templateParams.htmlWebpackPlugin.files.js.map(getSources) |
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
// "error-stack-parser": "2.0.1", | |
// "stacktrace-gps": "3.0.2" | |
// additional sources https://github.com/stacktracejs/stacktrace.js/blob/master/stacktrace.js#L102-L116 | |
import fs from 'fs'; | |
import path from 'path'; | |
import { SourceMapConsumer } from 'source-map'; | |
import StackTraceGPS from 'stacktrace-gps'; | |
import ErrorStackParser from 'error-stack-parser'; | |
import mapValues from 'lodash/mapValues'; |
OlderNewer