This file contains hidden or 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 | |
| echo "Decompile into smali format ..." | |
| apktool b ${1} /tmp/${1}-pack.apk | |
| echo "\n\nSign the package. Password is mykey ..." | |
| jarsigner -sigalg SHA1withRSA -digestalg SHA1 -keystore mykey.keystore /tmp/${1}-pack.apk mykey | |
| echo "\n\nZip align the apk ..." | |
| zipalign -f -v 4 /tmp/${1}-pack.apk /tmp/${1}.apk |
This file contains hidden or 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
| import random | |
| import threading | |
| class ThreadPool(object): | |
| def __init__(self, pool_size): | |
| self.pool_size = pool_size | |
| self.threads = [] | |
| def wait_for_thread(self): |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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/ ; |