This proposal has moved to https://github.com/sebmarkbage/ecmascript-rest-spread
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
os: | |
- linux | |
language: rust | |
rust: | |
- nightly | |
cache: | |
- apt | |
matrix: | |
include: | |
- env: |
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
/*<?php | |
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s", | |
//\u000A\u002F\u002A | |
class PhpJava { | |
static function main() { | |
echo(//\u000A\u002A\u002F | |
"Hello World!"); | |
}} | |
//\u000A\u002F\u002A | |
PhpJava::main(); |
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
# Install ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Set swiss-french keymap |
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
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
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
interface Option<T> { | |
map <U>(fn: (a: T) => U): Option<U>; | |
isSome(): boolean; | |
isNone(): boolean; | |
isSomeAnd(fn: (a: T) => boolean): boolean; | |
isNoneAnd(fn: () => boolean): boolean; | |
unwrap(): T; | |
unwrapOr(def: T): T; | |
unwrapOrElse(f: () => T): T; | |
map<U>(f: (a: T) => U): Option<U>; |
The prep-script.sh
will setup the latest Node and install the latest perf version on your Linux box.
When you want to generate the flame graph, run the following (folder locations taken from install script):
sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading http://unix.stackexchange.com/questions/14227/do-i-need-root-admin-permissions-to-run-userspace-perf-tool-perf-events-ar )
sudo sysctl kernel.perf_event_paranoid=0
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 params(fn) { | |
var str = fn.toString(); | |
var sig = str.match(/\(([^)]*)\)/)[1]; | |
if (!sig) return []; | |
return sig.split(', '); | |
} | |
console.api = function(obj){ | |
console.log(); | |
var proto = Object.getPrototypeOf(obj); |
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
$ cat t.js | |
gc(); | |
var before = process.memoryUsage(); | |
var express = require(process.argv[2]); | |
gc(); | |
var after = process.memoryUsage(); | |
var diff = {} | |
for (var i in before) diff[i] = after[i] - before[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
module.exports = Liner | |
var Transform = require('stream').Transform; | |
var util = require('util'); | |
util.inherits(Liner, Transform); | |
function Liner(options) { | |
Transform.call(this, options); | |
// We're only objectMode on the readable side, not writable. |
NewerOlder