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
sudo apt-get install libyaml-dev | |
sudo gem install psych |
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
sudo apt-get install git-core curl nodejs | |
curl -L get.rvm.io | sudo bash -s stable | |
source /etc/profile.d/rvm.sh | |
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion | |
sudo rvm install 1.9.3 | |
rvm use 1.9.3 --default | |
sudo gem install rails-api | |
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
svnadmin dump /home/svn/repository | gzip > repobackup.svn.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 | |
sudo mkdir /db/tmpfs | |
sudo mount -osize=256m tmpfs /db/tmpfs -t tmpfs | |
sudo chmod 777 /db/tmpfs | |
# IMPORTANT edit your /etc/apparmor.d/usr.sbin.mysqld | |
# to match your new path | |
# so /var/lib/mysql -> /db/tmpfs/mysql/ (there must be 2 links) | |
# Then restart apparmor /etc/init.d/apparmor restart |
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
<?php | |
if (class_exists("ZMQ") && defined("ZMQ::LIBZMQ_VER")) { | |
echo ZMQ::LIBZMQ_VER, PHP_EOL; | |
} |
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
<?php | |
$timezone = 'Europe/Madrid'; | |
$date_utc = '2013-05-17 21:54:26.0 UTC'; | |
date_default_timezone_set($timezone); | |
$time = strtotime($date_utc); | |
echo $date_utc . "\n"; |
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
echo 'deb http://debian.datastax.com/community stable main' > /etc/apt/sources.list.d/cassandra.sources.list | |
echo deb http://some.debian.mirror/debian/ raring main contrib non-free >> /etc/apt/sources.list | |
curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add - | |
apt-get update | |
apt-get install dsc12 | |
service cassandra stop | |
rm -rf /var/lib/cassandra/data/system/* |
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
$ go get github.com/kytrinyx/norwegish #for ex | |
$ git remote -v | |
origin https://github.com/kytrinyx/norwegish (fetch) | |
origin https://github.com/kytrinyx/norwegish (push) | |
# add your fork | |
$ git remote add fork git@github.com:you/norwegish.git | |
$ git remote -v | |
fork git@github.com:you/norwegish.git (fetch) | |
fork git@github.com:you/norwegish.git (push) |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
package main | |
import ( | |
"bytes" | |
"encoding/hex" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" |
OlderNewer