I hereby claim:
- I am pix0r on github.
- I am pix0r (https://keybase.io/pix0r) on keybase.
- I have a public key whose fingerprint is 24AF 484F 9A25 4A45 EC2B 1A3E 94C0 FC62 8BC3 39FD
To claim this, I am signing this object:
#!/bin/sh | |
if [ "$1" = "" ]; then | |
echo "Usage: $0 <file.json> [file2.json...]" | |
exit -1 | |
fi | |
CLEANJSON=`which cleanjson` | |
if [ "$CLEANJSON" = "" ]; then | |
echo "Please install cleanjson and ensure it's on your PATH" |
#include "UnityView.h" | |
#include "iPhone_View.h" | |
#include "iPhone_OrientationSupport.h" | |
#include "Unity/UnityInterface.h" | |
#include "Unity/GlesHelper.h" | |
#include "Unity/DisplayManager.h" | |
extern void UnitySendTouchesBegin(NSSet* touches, UIEvent* event); | |
extern void UnitySendTouchesEnded(NSSet* touches, UIEvent* event); |
I hereby claim:
To claim this, I am signing this object:
import sys | |
import unittest | |
import logging | |
from tree import Tree, tree, max_depth, max_depth_lr | |
logging.basicConfig(level=logging.DEBUG) | |
class TestInitTree(unittest.TestCase): |
def all_models | |
Rails.application.eager_load! | |
ActiveRecord::Base.descendants | |
end | |
def replace_string_across_all_objects(old, new) | |
all_models().each do |model| | |
print "Checking #{model} models\n" | |
model.all.each do |o| | |
o.attributes.each_pair do |name, value| |
#include <stdio.h> | |
int test() { | |
static int val = 0; | |
val += 1; | |
return val; | |
} | |
int main() { | |
printf("val: %d\n", test()); |
def zoom_level_for_bounds(bounds, map_dim={ height: 1000, width: 1000 }, zoom_max=21) | |
# See: http://stackoverflow.com/a/13274361/72 | |
return zoom_max if bounds.min_x == bounds.max_x and bounds.min_y == bounds.max_y | |
world_dim = { height: 256, width: 256 } | |
def lat_rad(lat) | |
sin = Math.sin(lat * Math::PI / 180) | |
rad_x2 = Math.log((1 + sin) / (1 - sin)) / 2 |
#!/bin/sh | |
PROJFILE=`find . -path \*xcodeproj/project.pbxproj -not -path \*Pods\*` | |
if [ "$PROJFILE" = "" ]; then | |
echo "Unable to locate project file; skipping pre-commit hook" | |
exit 0 | |
fi | |
git stash -q --keep-index |
require "net/http" | |
require "uri" | |
require "openssl" | |
def test_ssl(url, pem_file=nil) | |
puts "Testing URL: #{url}" | |
uri = URI.parse(url) | |
http = Net::HTTP.new(uri.host, uri.port) |
$ php test.php | |
Running 10 tests of 5000 iterations | |
finished 1 of 10 | |
finished 2 of 10 | |
finished 3 of 10 | |
finished 4 of 10 | |
finished 5 of 10 | |
finished 6 of 10 | |
finished 7 of 10 | |
finished 8 of 10 |