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
UPDATE pg_index | |
SET indisready=false | |
WHERE indrelid = ( | |
SELECT oid | |
FROM pg_class | |
WHERE relname='<TABLE_NAME>' | |
); | |
UPDATE pg_index | |
SET indisready=true |
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
%{IPORHOST:client_ip} - \[%{IPORHOST:x_forwarded_for}\] - %{DATA:client_identity} \[%{HTTPDATE:timestamp}\] \"(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|-)\" %{NUMBER:response} (?:%{NUMBER:bytes_sent;long}|-) (?:"(?:%{URI:referrer}|-)") %{QS:user_agent} %{NUMBER:request_length;long} %{NUMBER:response_time;double} %{DATA:upstream_proxy} %{NUMBER:upstream_bytes_sent;long} %{NUMBER:upstream_response_time} %{NUMBER:upstream_response} |
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
def chunk(l,n): | |
for i in range(0,len(l),n): | |
yield l[i:i+n] | |
list = [] # chunks | |
chunk(list, 30) |
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
--- | |
layout: null | |
--- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"> | |
<channel> | |
<title>{{ site.name | xml_escape }}</title> | |
<link>{{ site.url }}</link> | |
<description> |
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
# ~/.vim/bundle/my-snippets/snippets/markdown.snippets | |
snippet highlight | |
{% highlight ${1} %} | |
%{2} | |
{% endhighlight %} |
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/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
set :application, "Myapp" | |
set :repository, "ssh://[email protected]/yourrepo/app.git" | |
set :deploy_to, "/approot" | |
set :user, 'deployer' | |
set :use_sudo, false | |
set :use_nave, false | |
set :main_js, 'server.js' |
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
set :application, "<name>" | |
set :repository, "<repo>" | |
set :deploy_to, "/path/to/name" | |
set :user, 'deployer' | |
set :use_sudo, false | |
set :rvm_type, :system | |
set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names |
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
# in ~/.s3cfg | |
# modify host_base and host_bucket to the proper endpoints | |
host_base = s3-ap-southeast-1.amazonaws.com | |
host_bucket = %(bucket)s.s3-ap-southeast-1.amazonaws.com |
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/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
NewerOlder