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
#!/system/bin/sh | |
# | |
# Attach strace to a process as soon as it starts up. | |
# | |
# Some short-lifed Android apps will quit before we | |
# had a chance to attach strace to it and inspect its | |
# internal state. So this script will put itself in | |
# an endless loop and wait for the certain process to | |
# show up. Once the process appears, it will attach |
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
git log --no-merges --format="%ad %s" -i --grep=invite |
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
> db.stats() | |
{ | |
"collections" : 31, | |
"objects" : 33273261, | |
"avgObjSize" : 276.750695520947, | |
"dataSize" : 9208398124, | |
"storageSize" : 10635470336, | |
"numExtents" : 242, | |
"indexes" : 58, | |
"indexSize" : 10991725824, |
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
{% load usage %} | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Trunkly · Punch Chart</title> | |
<style> | |
body { margin: 30px auto; width: 800px; background-color:#333; } | |
div { background-color: green; } | |
a { color: #eee; font-size:11px; text-decoration:none; } | |
</style> |
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 | |
# the basic boost library | |
sudo apt-get install libboost-dev | |
# install the boost.python library | |
sudo apt-get install libboost-python-dev | |
# install the extra libraries we need | |
sudo apt-get install libboost-date-time-dev |
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
#!/usr/bin/env python | |
import plumrain | |
s = "2010-10-9 8:12:00" | |
print plumrain.utc_date_str_to_int(s, 10) |
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; |
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
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
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 |