Skip to content

Instantly share code, notes, and snippets.

View ssdr's full-sized avatar
🎯
Focusing

YanLIU ssdr

🎯
Focusing
View GitHub Profile
@neomantra
neomantra / bcname.lua
Created April 10, 2014 15:00
Convert LuaJIT bytecode number to name.
-- Converts a LuaJIT bytecode number to name
--
-- usage: luajit bcname.lua bytecode_number [bytecode_number2 [...]]
--
-- example:
-- $ luajit-2.1 bcname.lua 71 72
-- VARG
-- ISNEXT
--
-- From: http://www.freelists.org/post/luajit/frames-and-tail-calls,1
@chenshuo
chenshuo / query_freq.cc
Created November 3, 2012 22:59
Sort queries by their frequencies.
// answer to http://weibo.com/1915548291/z2UtyzuvQ
// see also http://www.cnblogs.com/baiyanhuang/archive/2012/11/11/2764914.html
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/noncopyable.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <fstream>
#include <iostream>
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e