2013.6.9 ~ 6.16 (端午+请两天假+周末)
计划安排 16 日到达北京,不影响 17 日正常上班。
$ sudo rpm -i http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm
$ sudo yum update
$ sudo yum install -y postgresql93-server postgresql93-contrib postgresql93-client
$ psql -d {database_name} -f /usr/pgsql-9.3/share/extension/hstore.sql
| " Vim Config | |
| " Source: http://www.integralist.co.uk/posts/vim-workflow-part-deux/ | |
| " switch syntax highlighting on, when the terminal has colors | |
| syntax on | |
| " use vim, not vi api | |
| set nocompatible | |
| " no backup files |
| require 'multi_json' | |
| require 'builder' | |
| data = File.new(ARGF[0]) | |
| json = MultiJson.load(data) | |
| feeds = {} | |
| json["subscriptions"].each do | item | | |
| item["categories"].each do |cat| | |
| cat_name = cat["label"] |
| # activerecord-3.0.0/lib/active_record/connection_adapters/mysql_adapter.rb | |
| # Maps logical Rails types to MySQL-specific data types. | |
| def type_to_sql(type, limit = nil, precision = nil, scale = nil) | |
| return super unless type.to_s == 'integer' | |
| case limit | |
| when 1; 'tinyint' | |
| when 2; 'smallint' | |
| when 3; 'mediumint' | |
| when nil, 4, 11; 'int(11)' # compatibility with MySQL default |
| // !$*UTF8*$! | |
| { | |
| archiveVersion = 1; | |
| classes = { | |
| }; | |
| objectVersion = 46; | |
| objects = { | |
| /* Begin PBXBuildFile section */ | |
| 000A6E5618E024720032B816 /* discount_time.png in Resources */ = {isa = PBXBuildFile; fileRef = 000A6E5218E024720032B816 /* discount_time.png */; }; |
| #!/usr/bin/env ruby | |
| require 'plist' | |
| require 'rest_client' | |
| def try_pass(apple_id, password) | |
| url = "https://fmipmobile.icloud.com/fmipservice/device/#{apple_id}/initClient" | |
| basicOauth = Base64.encode64("#{apple_id}:#{password}") | |
| headers = { |
| #!/bin/sh | |
| # create self-signed server certificate: | |
| # source: https://github.com/michaelliao/itranswarp.js/blob/master/conf/ssl/gencert.sh | |
| read -p "Enter your domain [www.example.com]: " DOMAIN | |
| echo "Create server key..." | |
| openssl genrsa -des3 -out $DOMAIN.key 1024 |
| [General] | |
| loglevel = notify | |
| skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12,127.0.0.0/24,100.64.0.0/10 | |
| bypass-tun = 0.0.0.0/8, 1.0.0.0/9, 1.160.0.0/11, 1.192.0.0/11, 10.0.0.0/8, 14.0.0.0/11, 14.96.0.0/11, 14.128.0.0/11, 14.192.0.0/11, 27.0.0.0/10, 27.96.0.0/11, 27.128.0.0/9, 36.0.0.0/10, 36.96.0.0/11, 36.128.0.0/9, 39.0.0.0/11, 39.64.0.0/10, 39.128.0.0/10, 42.0.0.0/8, 43.224.0.0/11, 45.64.0.0/10, 47.64.0.0/10, 49.0.0.0/9, 49.128.0.0/11, 49.192.0.0/10, 54.192.0.0/11, 58.0.0.0/9, 58.128.0.0/11, 58.192.0.0/10, 59.32.0.0/11, 59.64.0.0/10, 59.128.0.0/9, 60.0.0.0/10, 60.160.0.0/11, 60.192.0.0/10, 61.0.0.0/10, 61.64.0.0/11, 61.128.0.0/10, 61.224.0.0/11, 100.64.0.0/10, 101.0.0.0/9, 101.128.0.0/11, 101.192.0.0/10, 103.0.0.0/10, 103.192.0.0/10, 106.0.0.0/9, 106.224.0.0/11, 110.0.0.0/7, 112.0.0.0/9, 112.128.0.0/11, 112.192.0.0/10, 113.0.0.0/9, 113.128.0.0/11, 113.192.0.0/10, 114.0.0.0/9, 114.128.0.0/11, 114.192.0.0/10, 115.0.0.0/8, 116.0.0.0/8, 117.0.0.0/9, 117.128.0.0/10, 118.0.0.0/11, 118.64.0.0/10, 118.128.0.0 |