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
| def str2tel(word): | |
| n2a = {2: 'abc', 3: 'def', 4: 'ghi', 5: 'jkl', 6: 'mno', 7: 'pqrs', 8: 'tuv', 9: 'wxyz'} | |
| for t in word: | |
| for k,i in n2a.items(): | |
| if t in i: print k, |
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
| """ | |
| Bridge test client: | |
| So this one's going to be a doozy. | |
| Connect to target via SSH and then connect to target:localhost:8283(DAVE) and listen | |
| for the time messages. | |
| """ |
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
| require 'pry' | |
| require 'rubygems' | |
| require 'google/api_client' | |
| passPhrase = "notasecret" | |
| keyFile = "YOUR KEY HERE-privatekey.p12" | |
| cID = "YOUR ID HERE.apps.googleusercontent.com" | |
| scope = 'https://www.googleapis.com/auth/analytics.readonly' | |
| profileID = "YOUR PROFILE ID" | |
| email = 'YOUR_SA_ACCOUNT_EMAIL_HERE@developer.gserviceaccount.com' |
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/bash | |
| # https://gist.github.com/949831 | |
| # http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/ | |
| # command line OTA distribution references and examples | |
| # http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson | |
| # http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution | |
| # http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/ | |
| # http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html |
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 re | |
| import sys | |
| import os | |
| path = os.path | |
| CLEAN_RE = re.compile(r"""^\<\?php\s\/\*\*\/\seval\(base64_decode\("[^"]*"\)\);\?>""") | |
| def inspectFile(fullpath): | |
| try: |
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
| class Visitor(object): | |
| CHILD_ATTRS = ['value', 'thenPart', 'elsePart', 'expression', 'body','exception', 'initializer', 'tryBlock', 'condition','update', 'iterator', 'object', 'setup', 'discriminant', 'finallyBlock', 'tryBlock', 'varDecl', 'target'] | |
| def __init__(self, filepath): | |
| self.filepath = filepath | |
| #List of functions by line # and set of names | |
| self.functions = defaultdict(set) | |
| with open(filepath) as myFile: | |
| self.source = myFile.read() |
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
| from pynarcissus import jsparser | |
| from collections import defaultdict | |
| class Visitor(object): | |
| CHILD_ATTRS = ['thenPart', 'elsePart', 'expression', 'body', 'initializer'] | |
| def __init__(self, filepath): | |
| self.filepath = filepath | |
| #List of functions by line # and set of names |
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
| from flask import Flask | |
| from flask import request | |
| app = Flask(__name__) | |
| #Normally this would be an external file like object, but here | |
| #it's inlined | |
| FORM_PAGE = """ | |
| <html> | |
| <head> | |
| <title>Flask Form</title> |
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
| from collections import namedtuple | |
| from twisted.internet.defer import Deferred | |
| UserEvent = namedtuple("UserEvent", "subject, args, kwargs") | |
| class UserEventStack(object): | |
| def __init__(self, user): | |
| self.events = [] |
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
| from txweb.core import Site | |
| #from twisted.web.resource import Resource | |
| from twisted.internet import reactor | |
| import cgi | |
| class Root(object): | |
| def form(self, request): |