check with
pip install pep8
pep8 DIR
fix with
| #!/bin/bash -e | |
| # http://clang.llvm.org/docs/ClangTools.html | |
| # Clang and llvm, separate directories | |
| # Xcode project file for Clang | |
| git clone http://llvm.org/git/llvm.git | |
| cd llvm/projects |
| #!/usr/bin/python | |
| # Merges objc headers. | |
| # See WARNs for limitations | |
| import sys | |
| import re | |
| all_contents = [] # contents | |
| all_scopes = dict() # definition -> content |
| // Everything you need to know about cryptography in 1 hour | |
| // http://www.daemonology.net/papers/crypto1hr.pdf | |
| for (x = i = 0; i < MACLEN; i++) { | |
| x |= MAC_computed[i] − MAC_received[i]; | |
| } | |
| return (x ? MAC_GOOD : MAC_BAD); |
| #!/bin/bash | |
| # Change Xcode build specs by merging OSX's specs in iPhone Simulator's specs | |
| # This allows to build dynamic libraries for the simulator | |
| PLISTBUDDY="/usr/libexec/PlistBuddy" | |
| ROOT=`xcode-select -print-path` | |
| SIM_SPECS_DIR="$ROOT/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications" | |
| OSX_SPECS_DIR="$ROOT/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications" |
| // http://gcc.gnu.org/onlinedocs/cpp/Stringification.html | |
| #define xstr(s) str(s) | |
| #define str(s) #s |
| // source: https://www.mikeash.com/pyblog/friday-qa-2010-01-29-method-replacement-for-fun-and-profit.html | |
| #import <objc/runtime.h> | |
| void __attribute__((weak)) MethodSwizzle(Class c, SEL origSEL, SEL overrideSEL) { | |
| Method origMethod = class_getInstanceMethod(c, origSEL); | |
| Method overrideMethod = class_getInstanceMethod(c, overrideSEL); | |
| if (class_addMethod(c, origSEL, method_getImplementation(overrideMethod), method_getTypeEncoding(overrideMethod))) { | |
| class_replaceMethod(c, overrideSEL, method_getImplementation(origMethod), method_getTypeEncoding(origMethod)); | |
| } else { |
| # 360 script | |
| # This script (re)login automatically on the wifi of CapitalOne 360 cafe in San Francisco | |
| # created by: unknown | |
| # adapted by: acoomans | |
| require 'net/http' | |
| require 'uri' | |
| puts "<" * 80 |
| /** FBUIKit */ | |
| @interface UIImageView (FBUIKit) | |
| + (id)imageViewWithImageNamed:(id)arg1; | |
| @end | |
| @interface UITableView (FBUIKit) | |
| - (id)indexPathForLastRowInSection:(int)arg1; | |
| - (id)indexPathForLastRow; | |
| @end |