create linode server instance
local:
<shell>$ssh root@(IP ADDRESS)
remote:
sudo apt-get install unzip | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.17.4.zip | |
unzip elasticsearch-0.17.4.zip | |
sudo apt-get install python-software-properties | |
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" | |
sudo apt-get update | |
sudo apt-get install sun-java6-jre sun-java6-plugin | |
sudo mv elasticsearch-0.17.4 /usr/local/share | |
cd elasticsearch-servicewrapper | |
sudo mv service /usr/local/share/elasticsearch-0.17.4/bin |
# how to name keys in redis for keyvalue stores | |
http://code.google.com/p/redis/wiki/TwitterAlikeExample | |
http://rediscookbook.org/introduction_to_storing_objects.html | |
http://www.slideshare.net/playnicelyapp/redis-schema-design-for-playnicely-redis-london-meetup | |
antirez has a book about keyvalue design in the pipeline | |
http://code.google.com/p/redis/wiki/IntroductionToRedisDataTypes | |
schema: | |
<namespace>:<globalObject> |
(function(){ | |
var movs = new Array(); | |
$.fn.textNodes = function() | |
{ | |
function textNodeFiler(){ | |
return this.nodeType == 3 || this.nodeName == "BR" ; | |
} | |
return $(this).contents().filter(textNodeFiler).add($(this).find('*').contents().filter(textNodeFiler)); | |
}; |
#!/bin/sh | |
### BEGIN INIT INFO | |
## END INIT INFO | |
# Path to play install folder | |
PLAY_HOME=/usr/share/play | |
PLAY=$PLAY_HOME/play | |
# Path to the JVM | |
JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk |
select pg_class.relname,pg_locks.* from pg_class,pg_locks where pg_class.relfilenode=pg_locks.relation;
select * from pg_locks;
select * from pg_locks where granted = 'f' //the query that is waiting
select * from pg_locks where transactionid = 'xx' // queries running in a transaction
select * from pg_stat_activity
package main | |
import( | |
"io" | |
"os" | |
"fmt" | |
"flag" | |
) | |
var size = flag.Int64("size", 1024, "Size of the file to create") | |
var oName = flag.String("filename", "C:\\output.txt", "Name of the file to create") |
{ | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme", | |
"font_face": "Consolas", | |
"font_size": 11.0 | |
} |
copy nul emptyfile.txt > nul |
#!/bin/bash | |
# | |
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box | |
# http://wildfish.com | |
# add the ubuntu gis ppa | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update |