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
dd if=/dev/zero of=/extraswap bs=1M count=512 | |
mkswap /extraswap | |
echo '/extraswap none swap sw 0 0' >> /etc/fstab | |
chmod 600 /extraswap | |
swapon -a |
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
export DOKKU_HOST=$HOSTNAME | |
export PUBLIC_KEY=~/.ssh/id_rsa.pub | |
export DEVELOPER=john | |
cat $PUBLIC_KEY | ssh root@$DOKKU_HOST "sudo sshcommand acl-add dokku $DEVELOPER" |
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 add-apt-repository ppa:chris-lea/redis-server | |
sudo apt-get update | |
sudo apt-get install redis-server | |
sudo sed -i 's/^bind 127.0.0.1/bind <% your private network ip %>/g' /etc/redis/redis.conf | |
sudo service redis-server restart |
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
Comp.prototype.onClick = function(ev, el) { | |
var item = this.model.root.at(el.$bindStart.context.expression.pathSegments(el.$bindStart.context).join('.')); | |
}; | |
//// | |
app.on('model', function(model) { | |
model.fromEl = function(el) { | |
var ctx = el.$bindStart.context; | |
return this.at(ctx.expression.pathSegments(ctx).join('.')); |
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 path = require('path'); | |
var fs = require('fs'); | |
var noColor = process.argv.indexOf("--nocolor") > -1; | |
var testMode = process.argv.indexOf("--test") > -1; | |
function two(num) { | |
return ("0" + num).slice(-2); | |
} |
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/sh | |
## login: uuser | |
## passw: 1234567 | |
## Install nodejs, mongodb and deps | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list | |
sudo add-apt-repository -y ppa:chris-lea/node.js | |
sudo apt-get update |
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 fixModalOffet() { | |
var el = document.createElement("div"); | |
el.style.width = "1px"; | |
el.style.height = "1px"; | |
el.style.overflow = "scroll"; | |
el.style.position = "absolute"; | |
el.style.top = "-9999px"; | |
document.body.appendChild(el); | |
var style = document.createElement('style'); | |
style.type = 'text/css'; |
NewerOlder