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 | |
namespace Application\Migrations; | |
use Doctrine\DBAL\Migrations\AbstractMigration, | |
Doctrine\DBAL\Schema\Schema; | |
class Version20120920130854 extends AbstractMigration | |
{ | |
public function up(Schema $schema) |
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 -e | |
# DECLARE FUNCTIONS | |
# branch_exists_local <branch> | |
function branch_exists_local { | |
git show-ref --verify --quiet "refs/heads/$1" | |
} | |
# branch_exists_remote <remote_branch> |
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
node --version | |
v0.12.0 | |
node --harmony for-let.js | |
iterating 0 | |
timeout 10 |
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
"use strict"; | |
var stack = []; | |
for (let i = 0; i < 10; i++) { | |
console.log("inner: " + i); | |
i += 4; | |
stack.push(() => console.log("outer: " + i)); | |
} | |
stack.forEach(f => 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
import { getHello } from './some-dep' | |
console.log(getHello()) |
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
const lineA = 'R997,D443,L406,D393,L66,D223,R135,U452,L918,U354,L985,D402,R257,U225,R298,U369,L762,D373,R781,D935,R363,U952,L174,D529,L127,D549,R874,D993,L890,U881,R549,U537,L174,U766,R244,U131,R861,D487,R849,U304,L653,D497,L711,D916,R12,D753,R19,D528,L944,D155,L507,U552,R844,D822,R341,U948,L922,U866,R387,U973,R534,U127,R48,U744,R950,U522,R930,U320,R254,D577,L142,D29,L24,D118,L583,D683,L643,U974,L683,U985,R692,D271,L279,U62,R157,D932,L556,U574,R615,D428,R296,U551,L452,U533,R475,D302,R39,U846,R527,D433,L453,D567,R614,U807,R463,U712,L247,D436,R141,U180,R783,D65,L379,D935,R989,U945,L901,D160,R356,D828,R45,D619,R655,U104,R37,U793,L360,D242,L137,D45,L671,D844,R112,U627,R976,U10,R942,U26,L470,D284,R832,D59,R97,D9,L320,D38,R326,U317,L752,U213,R840,U789,L152,D64,L628,U326,L640,D610,L769,U183,R844,U834,R342,U630,L945,D807,L270,D472,R369,D920,R283,U440,L597,U137,L133,U458,R266,U91,R137,U536,R861,D325,R902,D971,R891,U648,L573,U139,R951,D671,R996,U864,L749,D681,R255,U306,R154,U706,L817,D798,R109,D594,R496,D867,L217,D572 |
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
const input = [240298, 784956] as const | |
function findCodes(min: number, max: number) { | |
const results: number[] = [] | |
next: | |
for (let i = min; i <= max; i++) { | |
const code = String(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
type Word = number | |
type Reader = Iterable<Word> | |
function run(mem: Word[], input: () => Word, output: (value: Word) => void) { | |
let position = 0 | |
function* program() { | |
while (position < mem.length) { | |
yield mem[position++] |
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
const input = | |
`COM)B | |
B)C | |
C)D | |
D)E | |
E)F | |
B)G | |
G)H | |
D)I | |
E)J |
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
type Word = number | |
type Reader = Iterable<Word> | |
function* run(mem: Word[], input: () => Word) { | |
let position = 0 | |
function* program() { | |
while (position < mem.length) { | |
yield mem[position++] |
OlderNewer