tmux new [-s name] [cmd]
(:new
) - new session
tmux ls
(:ls
) - list sessionstmux switch [-t name]
(:switch
) - switches to an existing session
The easiest thing is to explain how you use them: | |
1. define an insertion point in your template(s) using | |
{% insert "my_insertion_point" %} | |
The {% insert %} templatetag will then get_or_create() the appropriate | |
Insert in the database | |
2. the user visits the Insert in the admin, and adds plug-based |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
sudo add-apt-repository ppa:pitti/postgresql | |
sudo apt-get update | |
sudo apt-get install postgresql-9.2 postgresql-server-dev-9.2 postgresql-contrib-9.2 | |
sudo su -l postgres | |
psql -d template1 -p 5433 | |
CREATE EXTENSION IF NOT EXISTS hstore; | |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; | |
service postgresql stop | |
/usr/lib/postgresql/9.2/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.2/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.2/main/ -O "-c config_file=/etc/postgresql/9.2/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf" |
# Start the old vagrant | |
$ vagrant init centos-6.3 | |
$ vagrant up | |
# You should see a message like: | |
# [default] The guest additions on this VM do not match the install version of | |
# VirtualBox! This may cause things such as forwarded ports, shared | |
# folders, and more to not work properly. If any of those things fail on | |
# this machine, please update the guest additions and repackage the | |
# box. |
#!/usr/bin/python | |
import os.path, datetime, sys | |
import termcolor | |
datfile = "/opt/local/var/nagios/status.dat" | |
def main(infile): | |
if os.path.exists(datfile) == False: |
import restkit | |
import simplejson | |
YQL_URL = ('http://query.yahooapis.com', '/v1/public/yql') | |
value = '11215' | |
pmr = restkit.Resource(YQL_URL[0]) | |
query = 'SELECT * FROM geo.places WHERE text = "%s"' | |
qs = value.replace(r'"', r'\"') |
""" | |
Creates pretty-looking commit messages for git. This was created to pretty | |
print the old-commit-id values for filter-branched-rewritten commits in | |
pyphantomjs from the phantomjs repository. | |
""" | |
import os | |
import sys |
$ echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install postgresql-9.3 postgresql-contrib-9.3
you should succesfully installing postgresql 9.3.2 on your machine.
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash |