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 cache dir | |
proxy_cache_path /var/cache/nginx levels=1:2 | |
keys_zone=microcache:5m max_size=1000m; | |
# Virtualhost/server configuration | |
server { | |
listen 80; | |
server_name yourhost.domain.com; | |
# Define cached location (may not be whole site) |
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 indy; | |
import java.lang.invoke.CallSite; | |
import java.lang.invoke.ConstantCallSite; | |
import java.lang.invoke.MethodHandle; | |
import java.lang.invoke.MethodHandles; | |
import java.lang.invoke.MethodType; | |
import java.lang.reflect.Constructor; | |
import org.objectweb.asm.ClassWriter; |
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 | |
if [ "$1" == "" ]; then | |
echo Usage: $0 pngfile | |
exit 0; | |
fi | |
FILE=`basename $1 .png` | |
if [ ! -e $FILE.png ]; then |
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 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" |
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
import re | |
from nose.tools import assert_equal | |
from nose_parameterized import parameterized | |
from tsquery_escape import tsquery_escape | |
@parameterized([ | |
("1 OR 2", "1 | 2"), | |
("(1) 2", "( 1 ) & 2"), | |
("&", "'&':*"), |
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
(ns crmui-reagent.core | |
(:require | |
[cljsjs.material-ui] | |
[cljs-react-material-ui.core :as ui] | |
[cljs-react-material-ui.reagent :as rui] | |
[cljs-react-material-ui.icons :as ic] | |
[reagent.core :as r :refer [atom]] | |
[reagent.session :as session] | |
[secretary.core :as secretary :include-macros true] | |
[accountant.core :as accountant] |