This file contains hidden or 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 spawn($command_line, $dir) | |
| { | |
| $descriptorspec = [ | |
| 0 => [ "pipe", "r" ], // stdin | |
| 1 => [ "pipe", "w" ], // stdout | |
| 2 => [ "pipe", "w" ], // stderr | |
| ]; | |
| $process = proc_open($command_line, $descriptorspec, $pipes, $dir); | |
| if (!is_resource($process)) { |
This file contains hidden or 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 log($msg) | |
| { | |
| $args = func_get_args(); | |
| array_shift($args); // $msg | |
| error_log(array_reduce($args, function($v, $w) { | |
| return $v . var_export($w, true); | |
| }, $msg)); | |
| } |
This file contains hidden or 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
| ./configure CC=cc |
This file contains hidden or 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
| ./configure --prefix=/opt/local/ CC=cc |
This file contains hidden or 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
| CXX = c++ | |
| GXX = $(CXX) # a quick and dirty hack to use clang compiler instead of gnu | |
| INCLUDES += -I/opt/local/include/ | |
| LDFLAGS += -L/opt/local/lib/ | |
| #CPUOPTION = -march=core2 | |
| CPUOPTION = -march=native | |
| #USE_TBB_SCALABLE_ALLOCATOR = 1 | |
| USE_TCMALLOC = 0 | |
| #LOADLIBES += -lboost_system -liconv |
This file contains hidden or 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
| ./configure --prefix=/opt/local/ CPPFLAGS=-I/opt/local/include/ LDFLAGS=-L/opt/local/lib LIBS=-liconv |
This file contains hidden or 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
| LITCOFFEES = FileList['*.litcoffee'] | |
| JSS = LITCOFFEES.ext('.js') | |
| rule '.js' => '.litcoffee' do |t| | |
| sh "coffee -c #{t.source}" | |
| end | |
| task :default => JSS | |
| task :watch do |
This file contains hidden or 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
| .SUFFIXES: .litcoffee .js | |
| JSS = a.js b.js c.js | |
| all: $(JSS) | |
| .litcoffee.js: | |
| coffee -c $< | |
| watch: | |
| coffee -wc $(JSS:.js=.litcoffee) |
This file contains hidden or 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
| uid = ((Math.random() * 10000)|0) + | |
| '-' + Date.now() + | |
| '-' + ((Math.random() * 10000)|0) |
This file contains hidden or 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
| tween = ($from, $to, therefore) -> | |
| $a = $from.clone() | |
| $from.css(opacity: 0.75) | |
| $a.css(position: 'absolute') | |
| .css($from.offset()) | |
| .css('border-color', 'transparent') | |
| $from.parent().append $a | |
| $a.animate $to.position(), | |
| complete: -> | |
| $a.remove() |
OlderNewer