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
| private void extractDex(String apk) { | |
| try { | |
| JarFile file = new JarFile(apk); | |
| Enumeration<JarEntry> entries = file.entries(); | |
| while (entries.hasMoreElements()) { | |
| JarEntry entry = entries.nextElement(); | |
| if (entry.getName().equals("classes.dex")) { | |
| File cache = getDir("dex_cache", Context.MODE_PRIVATE); | |
| if (!cache.exists()) | |
| cache.mkdirs(); |
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 datetime | |
| import time | |
| from google.appengine.ext import db | |
| from google.appengine.ext import ndb | |
| def to_dict(model): | |
| """Convert a db or ndb entity to a json-serializable dict.""" | |
| output = {} |
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
| # Container for a Python WSGI application. | |
| FROM ubuntu:12.04 | |
| MAINTAINER Tyler Treat <tyler.treat@webfilings.com> | |
| RUN apt-get update | |
| # Install Python tools | |
| RUN apt-get install -y python python-dev python-distribute python-pip |
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 cPickle | |
| import logging | |
| import redis | |
| TIMEOUT = 60 * 60 | |
| _redis = None | |
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
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| const maxThread = 16 |
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
| package main | |
| import ( | |
| "fmt" | |
| "strconv" | |
| "time" | |
| "github.com/gdamore/mangos" | |
| "github.com/gdamore/mangos/protocol/pub" | |
| "github.com/gdamore/mangos/protocol/sub" |
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
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" | |
| "github.com/Shopify/sarama" | |
| ) |
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
| package nsq | |
| import ( | |
| "github.com/bitly/go-nsq" | |
| "github.com/tylertreat/Flotilla/flotilla-server/daemon/broker" | |
| ) | |
| const topic = "test" | |
| type NSQPeer struct { |
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
| func start(host string) { | |
| pub := NewNSQPeer(host) | |
| for i := 0; i < 1000; i++ { | |
| message := getMessage() | |
| pub.Send(message) | |
| } | |
| pub.Teardown() | |
| } |
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
| $ iptables -A INPUT -m statistic --mode random --probability 0.1 -j DROP | |
| $ iptables -A OUTPUT -m statistic --mode random --probability 0.1 -j DROP |
OlderNewer