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
| var fs = require('fs'); | |
| var when = require('when'); | |
| function promisify(fn) { | |
| return function () { | |
| var deferred = when.defer(); | |
| var args = Array.prototype.slice.call(arguments); | |
| args.push(function (err) { | |
| if (err) | |
| deferred.reject(err); |
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
| var EventEmitter = require('events').EventEmitter; | |
| var fs = require('fs'); | |
| var path = require('path'); | |
| // returns an EventEmitter | |
| // that fires 'absent' or 'present' events for a particular `filename` in a `folder`. | |
| // call .close() it when done. | |
| // `options` is not a mandatory argument (see fs.watch) | |
| function fileExist(folder, filename, options) { | |
| var ee = new EventEmitter(); |
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
| var assert = require('assert'); | |
| var util = require('util'); | |
| function MyError(msg) { | |
| this.message = msg; | |
| this.toString = function () { return 'Error: ' + msg; }; | |
| return this; | |
| } | |
| function testErrorClass(ErrClass, name) { |
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
| module.exports = function (id) { | |
| var findRoot = function (mod) { return mod.parent ? findRoot(mod.parent) : mod; }; | |
| return findRoot(module).require(id); | |
| }; |
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
| ./Tools/Scripts/build-webkit --makeargs="-j8" --qt --qmakearg="QMAKE_LIBDIR+=$HOME/release/lib INCLUDEPATH+=$HOME/release/include" --touch-events --code-coverage --install-headers=$HOME/release/include --install-libs=$HOME/release/lib | |
| cd WebKitBuild/Release && make install |
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
| vagrant box add quantal64 http://cloud-images.ubuntu.com/vagrant/quantal/current/quantal-server-cloudimg-amd64-vagrant-disk1.box |
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
| sudo -u mysql innobackupex --parallel=2 --use-memory=2G --compress --compress-threads=4 --user= --password= /data/backups/mysql |
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
| #!/bin/bash | |
| rediscli=`which redis-cli` | |
| s3cmd=`which s3cmd` | |
| lsave=`$rediscli lastsave` | |
| echo "LASTSAVE $lsave" | |
| saved="`$rediscli config get dir | xargs | cut -d ' ' -f 2`/`$rediscli config get dbfilename | xargs | cut -d ' ' -f 2`" | |
| $rediscli bgsave | |
| while [ $lsave -eq `$rediscli lastsave` ]; 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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "dummy" | |
| config.vm.provider :aws do |aws| | |
| aws.access_key_id = ENV['AWS_ACCESS_KEY_ID'] | |
| aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] | |
| aws.keypair_name = "vagrant" # make sure you have a AWS keypair named vagrant |
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
| javascript:(function(){ $('#signwall').remove(); $('html').attr('style', 'overflow: auto;'); $("[style*='display: block;']").each(function () { $(this).attr('style', 'display: none;') }); })(); |