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
" copy all this into a vim buffer, save it, then... | |
" source the file by typing :so % | |
" Now the vim buffer acts like a specialized application for mastering vim | |
" There are two queues, Study and Known. Depending how confident you feel | |
" about the item you are currently learning, you can move it down several | |
" positions, all the way to the end of the Study queue, or to the Known | |
" queue. | |
" type ,, (that's comma comma) |
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/sh | |
files=$(git diff --cached --name-only --diff-filter=ACM | grep ".js$") | |
if [ "$files" = "" ]; then | |
exit 0 | |
fi | |
pass=true | |
for file in ${files}; do |
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
var pick_color = (function(str) { | |
// We use a circular buffer here to allocate the colors. `label_color_map` | |
// is a hash with key as `str` and value is the index into the `colors` | |
// list. The following 'static' variables keep the state within the function. | |
var label_color_map = {}, | |
current_color_idx = 0, | |
colors = ['#a6cee3', '#1f78b4', '#b2df8a', '#33a02c', '#fb9a99', | |
'#e31a1c', '#fdbf6f', '#ff7f00', '#cab2d6', '#6a3d9a', '#ffff99', '#b15928']; | |
return function(str) { |
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
/* | |
To use this script, replace the {{YOUR_TORPIO_KEY}} with your torpio.io API key | |
and replace {{{{YOUR_CHOIR_IO_KEY}} with your choir.io key when you create an API source. | |
*/ | |
var settings = {}; |
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
Verifying that +alexdong is my Bitcoin username. You can send me #bitcoin here: https://onename.io/alexdong |
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
$ ht shell | |
hypertable> create table bookmarks (url); | |
Elapsed time: 0.03 s | |
hypertable> INSERT INTO bookmarks VALUES | |
-> ("homepage", "url", "http://alexdong.com"); | |
Elapsed time: 0.00 s | |
Avg value size: 19.00 bytes | |
Total cells: 1 |
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
alexdong@clifton % date /opt/hypertable/current/log | |
Tue Jul 27 09:53:56 UTC 2010 | |
alexdong@clifton % tail -n 5 Hypertable.RangeServer.log /opt/hypertable/current/log | |
STAT hits[550,2009-02-17 02:06:56,14739441..633,2009-10-27 22:20:04,7783332](default) cumulative_size 201426188 <= prune_threshold 867668958 | |
STAT hits[633,2009-10-27 22:20:04,7783332..7428,2009-01-26 22:59:26,4197051](default) cumulative_size 201426188 <= prune_threshold 867668958 | |
STAT hits[7428,2009-01-26 22:59:26,4197051..86059,2010-02-02 09:25:06,56699891](default) cumulative_size 353111255 <= prune_threshold 867668958 | |
STAT hits[86059,2010-02-02 09:25:06,56699891..��](default) cumulative_size 353111255 <= prune_threshold 867668958 | |
1280224430 INFO Hypertable.RangeServer : (/root/src/hypertable/src/cc/Hypertable/RangeServer/RangeServer.cc:2619) Memory Usage: 1170841532 bytes | |
alexdong@clifton % date |
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
using python ; | |
# Specify that the boost-python library exists under the name | |
# boost_python. That is, because the library was installed at the | |
# standard search path as /usr/lib/libboost_python.so, bjam will find | |
# it automatically. No need to specify the absolute path. | |
# lib libboost_python : : <name>boost_python-mt ; | |
lib libboost_python : : <name>boost_python ; | |
lib libboost_date_time : : <name>boost_date_time ; |
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
# Edit this path to point at the tools/build/v2 subdirectory of your | |
# Boost installation. Absolute paths work, too. | |
boost-build /usr/share/doc/libboost1.40-doc/examples/tools/build/v2/ ; |
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
#include "boost/date_time/gregorian/gregorian.hpp" | |
#include "boost/date_time/posix_time/posix_time.hpp" | |
#include <boost/python.hpp> | |
#include <iostream> | |
#include <string> | |
int utc_date_str_to_int(const char* s, int offset) { | |
using namespace boost::gregorian; | |
using namespace boost::posix_time; |
OlderNewer