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
# First run: | |
apt-get install apt-cacher python-vm-builder | |
vi /etc/default/apt-cacher # ensure autostart is enabled | |
sudo service apt-cacher start | |
# Note that apt-cacher caused some problems for me, you can also try apt-cacher-ng, making sure to set the listen address to 127.0.0.1 (which it for some reason doesn't do if you have IPv6 in some cases) | |
git clone git://github.com/TheBlueMatt/bitcoin.git | |
git clone git://github.com/devrandom/gitian-builder.git | |
mkdir gitian-builder/inputs | |
wget 'http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.5.tar.gz' -O gitian-builder/inputs/miniupnpc-1.5.tar.gz |
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 - | |
#==================================================================== | |
# | |
# DESCRIPTION: on Debian-based systems, installs dependencies for | |
# blather, gets source code for sphinx stuff, builds, installs | |
# program, config files, and so forth. USE AT YOUR OWN RISK! | |
# READ THE SCRIPT CAREFULLY AND DECIDE IF YOU WANT TO USE IT | |
# | |
# REQUIREMENTS: debian-based system, sudo privileges | |
# BUGS: --- |
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
export NEWUSER=ubuntu | |
sudo useradd -m $NEWUSER | |
sudo usermod -s /bin/bash $NEWUSER | |
usermod -G sudo $NEWUSER | |
sudo apt-get update | |
sudo apt-get install nodejs | |
sudo ln -s /usr/bin/nodejs /usr/bin/node |
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
var fs = require("fs"); | |
var ext = "pdf"; | |
var fileName = './out.pdf'.toLowerCase(); | |
var fileNameNoEXT = fileName.replace("."+ext,""); | |
fs.readFile(fileName,"utf8", function (err, data) { | |
if (err) throw err; | |
data = data.split("endobj") | |
for(var i in data){ | |
if(data[i].indexOf("/Count") >= 0){ |
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
SlaveClass 1constructor lol | |
SlaveClass 2constructor lol | |
SlaveClass 3constructor lol | |
SlaveClass v1.3 | |
SlaveClass a | |
SlaveClass b | |
SlaveClass c | |
{} |
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
Function.prototype.extend = function(_class, subClass) { | |
if (!subClass) { | |
return _Class(Object, _class); | |
} | |
else { | |
return _Class(_class, subClass); | |
} | |
}; | |
function _Class(parent, child) { |
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
define(function() { | |
function css(file) { | |
this._file = file; | |
this.element = css.lookfor(this._file); | |
if (!this.element) { | |
this.element = document.createElement("link"); | |
this.element.setAttribute("rel", "stylesheet"); | |
this.element.setAttribute("type", "text/css"); | |
this.element.setAttribute("href", this._file); | |
} |
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
ps -ef | grep node | grep -v grep | grep -v "vfs-worker" | grep -v "bin/node -e (" | awk '{print $2}' | xargs kill -9 |
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
var fs = require("fs"); | |
var inPath = __dirname + "/in"; | |
var outPath = __dirname + "/out"; | |
fs.readdir(inPath, function(err, files) { | |
if (err) throw err; | |
for (var i in files) { | |
fs.readFile(inPath + "/" +files[i], doWrap(files[i])); | |
} | |
}); |
OlderNewer