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
# -*- coding: utf-8 -*- | |
from keyhac import * | |
def configure(km): | |
remap_jp(km) | |
def remap_jp(km): | |
kmg = km.defineWindowKeymap() | |
# @ -> " | |
kmg['S-2'] = 'S-Quote' |
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
select | |
column1, | |
column2, | |
column3, | |
column4, | |
column5 | |
from ( | |
select | |
'"column1"' column1, | |
'"column2"' column2, |
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
package utils; | |
import java.util.Calendar; | |
import java.util.Date; | |
import java.util.Iterator; | |
public class DateIterator implements Iterator<Date> { | |
private Calendar from = Calendar.getInstance(); | |
private Calendar to = Calendar.getInstance(); |
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
package utils; | |
public class GeoTools { | |
public static class BoundingBox { | |
public double north; | |
public double south; | |
public double east; | |
public double west; |
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
;; database name = connect string | |
;; | |
;; connect string params: | |
;; dbname= host= port= user= password= | |
;; client_encoding= datestyle= timezone= | |
;; pool_size= connect_query= | |
[databases] | |
* = host=localhost port=5434 |
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
global | |
log 127.0.0.1 local0 info | |
maxconn 10240 | |
user haproxy | |
group haproxy | |
daemon | |
defaults | |
log global | |
mode tcp |
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/bash | |
sudo yum -y install rpm-build rpmdevtools | |
rpmdev-setuptree |
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/bash | |
sudo yum -y install pcre-devel openssl-devel | |
cd ~/rpmbuild/SOURCES | |
wget http://www.haproxy.org/download/1.5/src/haproxy-1.5.6.tar.gz | |
tar zxf haproxy-1.5.6.tar.gz | |
cp -p haproxy-1.5.6/examples/haproxy.spec ../SPECS/haproxy156.spec | |
sed -i 's/USE_PCRE=1 /USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1 /' ../SPECS/haproxy156.spec | |
rpmbuild -bb ../SPECS/haproxy156.spec | |
sudo yum -y localinstall ../RPMS/x86_64/haproxy-1.5.6-1.x86_64.rpm |
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/bash | |
PGPASSWORD=YOUR_PASSWORD psql -h xxx.yyy.zzz.us-west-2.rds.amazonaws.com -p 5432 -U YOUR_USER -d postgres << EOF | |
CREATE DATABASE YOUR_DBNAME | |
WITH OWNER = YOUR_USER | |
ENCODING = 'UTF8' | |
LC_COLLATE = 'C' | |
LC_CTYPE = 'C' | |
TEMPLATE = template0 | |
CONNECTION LIMIT = -1; | |
EOF |
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
[program:YOUR_PROCESS_NAME] | |
process_name=%(program_name)s | |
directory=/path/to/YOUR_APP_DIR | |
command=YOUR_APP_LAUNCH_COMMAND | |
autostart=true | |
autorestart=true | |
user=YOUR_APP_USER | |
redirect_stderr=true | |
stdout_logfile=/path/to/YOUR_LOG_DIR/%(program_name)s.log | |
stdout_logfile_maxbytes=10MB |