start new:
tmux
| // === Arrays | |
| var [a, b] = [1, 2]; | |
| console.log(a, b); | |
| //=> 1 2 | |
| // Use from functions, only select from pattern | |
| var foo = () => [1, 2, 3]; |
| --log_gc (Log heap samples on garbage collection for the hp2ps tool.) | |
| type: bool default: false | |
| --expose_gc (expose gc extension) | |
| type: bool default: false | |
| --max_new_space_size (max size of the new generation (in kBytes)) | |
| type: int default: 0 | |
| --max_old_space_size (max size of the old generation (in Mbytes)) | |
| type: int default: 0 | |
| --max_executable_size (max size of executable memory (in Mbytes)) | |
| type: int default: 0 |
| #!/bin/bash | |
| # | |
| # Bash script to setup headless Selenium (uses Xvfb and Chrome) | |
| # (Tested on Ubuntu 12.04) trying on ubuntu server 14.04 | |
| # Add Google Chrome's repo to sources.list | |
| echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list | |
| # Install Google's public key used for signing packages (e.g. Chrome) | |
| # (Source: http://www.google.com/linuxrepositories/) |
| // React Class template with inlined documentation from | |
| // http://facebook.github.io/react/docs/component-specs.html | |
| var component = React.createClass({ | |
| /***** Core Methods *****/ | |
| render: function () { | |
| // Returns ReactComponent |
| #! /usr/bin/env python | |
| # Standard library imports. | |
| from SocketServer import ThreadingMixIn | |
| import BaseHTTPServer | |
| import SimpleHTTPServer | |
| import sys | |
| import json | |
| import os | |
| from os.path import (join, exists, dirname, abspath, isabs, sep, walk, splitext, |
| <!DOCTYPE html> | |
| <html> | |
| <head lang="en"> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <script type="text/javascript"> | |
| var httpRequest; | |
| if (window.XMLHttpRequest) { // Mozilla, Safari, ... |
| #!/usr/bin/env python | |
| # Clone or update all a user's gists | |
| # curl -ks https://gist.githubusercontent.com/fedir/5466075/raw/gist-backup.py | USER=fedir python | |
| # USER=fedir python gist-backup.py | |
| import json | |
| import urllib | |
| from subprocess import call | |
| from urllib import urlopen | |
| import os |
| var http = require('http'); | |
| var options = { | |
| hostname: 'api.github.com', | |
| path: '/api/endpoint', | |
| headers: { | |
| 'User-Agent': 'UserAgentHere', | |
| 'Accept': 'application/json' | |
| } | |
| }; | |
| var request = http.request(options, function(response) { |
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |