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
// for beginners and if you just want to test some bullet pattern | |
// this is a good way to start. | |
function enter() { | |
// equivalent to @Initialize ( I think) | |
// Load some graphics | |
// Make yourself some coffee | |
} | |
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
#include <boost/spirit/home/phoenix/core.hpp> | |
#include <boost/spirit/home/phoenix/bind.hpp> | |
#include <boost/spirit/home/phoenix/operator.hpp> | |
#include <boost/bind.hpp> | |
#include "flusspferd.hpp" | |
using namespace flusspferd; | |
using namespace std; |
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
#!/usr/bin/env node | |
var fs = require('fs'), | |
util = require('util'), | |
express = require('express'), | |
spawn = require('child_process').spawn, | |
app = express.createServer( | |
express.profiler(), | |
express.logger(), | |
express.bodyParser() |
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
$ brew install -v coreutils | |
==> Downloading http://ftp.gnu.org/gnu/coreutils/coreutils-8.7.tar.gz | |
File already downloaded and cached to /Users/aqian/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/aqian/Library/Caches/Homebrew/coreutils-8.7.tar.gz | |
==> ./configure --prefix=/usr/local/Cellar/coreutils/8.7 --program-prefix=g | |
./configure --prefix=/usr/local/Cellar/coreutils/8.7 --program-prefix=g | |
checking for a BSD-compatible install... /usr/bin/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d | |
checking for gawk... no |
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 | |
# | |
# create a new user called airvideo | |
# $ sudo adduser airvideo | |
# place this file in /etc/init.d/airvideo-server | |
# change the file permission to executable: | |
# $ sudo chmod +w /etc/init.d/airvideo-server | |
# add it to default run level | |
# $ sudo update-rc.d airvideo-server defaults | |
# |
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
# This will trigger Runtime Error "executing in another thread" from ruby-oci8 | |
# The cause is Timeout interrupted the rb_thread_blocking_region() and causing | |
# oci8_unblock_func() to be run, however, svcctx->executing_thread is not set | |
# to nil, causing the client to get into a bad state. | |
# See http://rubyforge.org/forum/forum.php?thread_id=50112&forum_id=1078 | |
require 'rubygems' | |
require 'oci8' | |
require 'timeout' |
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
require 'benchmark' | |
class Foo | |
def bar | |
true | |
end | |
end | |
n = 1_000_000 | |
Benchmark.bm(30) do | b | |
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
Client side: | |
model Sync (Ajax API) | |
model view binding. ( Backbone.ModelBinder ) | |
form builder, build a form based on a model | |
Server side: |
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
/** | |
* WkHtmlToPdf table splitting hack. | |
* | |
* Script to automatically split multiple-pages-spanning HTML tables for PDF | |
* generation using webkit. | |
* | |
* To use, you must adjust pdfPage object's contents to reflect your PDF's | |
* page format. | |
* The tables you want to be automatically splitted when the page ends must | |
* have a class name of "splitForPrint" (can be changed). |
OlderNewer