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
/*! angular-google-maps 1.1.6 2014-06-28 | |
* AngularJS directives for Google Maps | |
* git: https://github.com/nlaplante/angular-google-maps.git | |
*/ | |
/* | |
! | |
The MIT License | |
Copyright (c) 2010-2013 Google, Inc. http://angularjs.org |
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
# 208 bytes | |
$b=99;$d=" bottles of beer";$c="$d on the wall";do{echo "$b$c, $b$d.\n";if(!--$b){echo "Go to the store and buy some more";$b=99;}else echo "Take one down and pass it around";echo ", $b$c.\n\n";}while($b<99); |
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
package aoc | |
func CalcFloor(s string) int { | |
res := 0 | |
for i := 0; i < len(s); i++ { | |
if s[i] == '(' { | |
res++ | |
} else if s[i] == ')' { | |
res-- |
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 MartinLindhe\Brainfuck; | |
class Interpreter | |
{ | |
protected $cells; | |
protected $pointer = 0; | |
public function exec($s) | |
{ |
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
section .text | |
global mystart | |
int_to_string: | |
add esi,9 | |
mov byte [esi],0 | |
mov ebx,10 | |
.next: |
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
package aoc | |
import ( | |
"fmt" | |
"regexp" | |
"strconv" | |
) | |
func newChristmasLightsPart2() [1000][1000]int { | |
// 1 million lights in a 1000x1000 grid |
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
package aoc | |
import ( | |
"fmt" | |
"regexp" | |
"strconv" | |
"strings" | |
) | |
func makeCircuit(s string) map[string]string { |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"image" | |
"image/draw" | |
"image/png" | |
"io/ioutil" | |
"log" |
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/sh | |
# | |
# NOTE: this only works on OSX due to the syntax of the stat command | |
# | |
# brew install jpeg jpegoptim | |
inFile=$1 | |
if [ -z $inFile ]; then | |
echo "Syntax: $0 filename" |
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/sh | |
# | |
# NOTE: this only works on OSX due to the syntax of the stat command | |
# | |
# brew install pngcrush optipng | |
inFile=$1 | |
if [ -z $inFile ]; then | |
echo "Syntax: $0 filename" |
OlderNewer