As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
| # https://ruby-china.org/topics/7555 | |
| # gem 'fast_trie', :require => "trie" | |
| # encoding: utf-8 | |
| class SegTrie | |
| attr_accessor :trie | |
| def initialize | |
| self.trie = ::Trie.new | |
| end |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # | |
| #author: rex | |
| #blog: http://iregex.org | |
| #filename tr.py | |
| #created: 2010-08-01 20:24 | |
| #source uri: http://iregex.org/blog/trie-in-python.html | |
| # escape bug fix by fcicq @ 2012.8.19 |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # | |
| #author: rex | |
| #blog: http://iregex.org | |
| #filename tr.py | |
| #created: 2010-08-01 20:24 | |
| #source uri: http://iregex.org/blog/trie-in-python.html | |
| # escape bug fix by fcicq @ 2012.8.19 |
| <?php | |
| $posting = $database->postlist_begin( $search_id ); | |
| $enquire = new XapianEnquire( $database ); | |
| $rset = new XapianRset(); | |
| $rset->add_document( $posting->get_docid() ); | |
| $eset = $enquire->get_eset(20, $rset); | |
| $i = $eset->begin(); | |
| $terms = array(); |
| # EDIT: 2013/10/20 | |
| # google has updated its kwt UI, this script doesn't work any more! | |
| # may be I will update this script when I have time to investigate their new Interface. | |
| from selenium import webdriver | |
| from selenium.common.exceptions import TimeoutException | |
| import selenium.webdriver.support.wait | |
| selenium.webdriver.support.wait.POLL_FREQUENCY = 0.05 | |
| import re |
| var Searcher = { | |
| a: function() { | |
| so = this; | |
| so.g(); | |
| window._r_ = false; | |
| window.google = { | |
| td: function(a, b, c) { | |
| if (window._r_) return; | |
| var h = c.d; | |
| var t = h.match(/<font size="-1">[^,\d]*([,\d]+)[^,\d]*条结果[^\d]*(\d+)[^\d]*(用时 <b>(.*?)<\/b> 秒) <\/font>/); |
| echo "hello world" | curl -s -F 'api_dev_key=f058f68ae36897f3f15fcccba445d551' -F 'api_option=paste' -F 'api_paste_code=<-' http://pastebin.com/api/api_post.php | |
| # https://clbin.com/ |
| // http://blog.evilissimo.net/simple-port-fowarder-in-golang | |
| package main | |
| import ( | |
| "io" | |
| "log" | |
| "net" | |
| "os" | |
| ) |
| # using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty | |
| # more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua | |
| http { | |
| lua_package_path "/etc/nginx/include.d/?.lua;;"; | |
| lua_socket_pool_size 100; | |
| lua_socket_connect_timeout 10ms; | |
| lua_socket_read_timeout 10ms; | |
| server { |