Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
dhcp-script=/etc/detect_new_device.sh
Reference:
(function(win){ | |
win.CHECK = function(){ | |
return { | |
version: 'v1', | |
hello: function(){ | |
console.log('hello'); | |
} | |
} | |
}; | |
}(window)); |
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
var fetch = require('node-fetch'); | |
var agent = require('proxy-agent'); | |
const proxyUri = process.env.HTTP_PROXY; | |
const targetUri = process.env.TARGET_URI; | |
var opts = { | |
method: 'GET', | |
agent: new agent(proxyUri) | |
}; |
codemod -d ./src --editor nvim --extensions js,jsx \ | |
'(import React)(.*{\s*PropTypes.*})(.*)' \ | |
"import PropTypes from 'propt-types';\n\1\3 | |
codemod -d ./src --editor nvim --extensions js,jsx \ | |
'(import React.*)(,\sPropTypes,?)(.*)' \ | |
"import PropTypes from 'propt-types';\n\1\3 | |
#Prefix | |
unbind C-b | |
set -g prefix C-a | |
#---- | |
set -g mouse on | |
setw -g mode-keys vi | |
set-environment -g 'IGNOREEOF' 2 | |
#no delay on passing keys | |
set -sg escape-time 1 | |
#no more weird characters on mouse click |
#!/bin/bash | |
PROJECT_NAME=$(basename $PWD) | |
git init . | |
npm init -y | |
curl -L https://www.gitignore.io/api/vim,node >> .gitignore | |
curl -L https://goo.gl/editorconfig > .editorconfig | |
# Readme Content |
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |
var http = require('http'); | |
http.createServer(function(req,res){ | |
res.writeHead(200, {"Content-Type": "text/plain"}); | |
res.end('hello world'); | |
}).listen(3000, "127.0.0.1"); |