Skip to content

Instantly share code, notes, and snippets.

View richy486's full-sized avatar
🐶
Experimenting

Richard Adem richy486

🐶
Experimenting
View GitHub Profile
@richy486
richy486 / reloadPods.sh
Created December 8, 2014 03:05
clear and re install cocoapods
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@richy486
richy486 / CircularPointArray.h
Created April 8, 2015 11:11
Circular CGPoint Array
//
// CircularPointArray.h
//
// Created by @richy486 on 8/04/2015.
// Copyright (c) 2015 @richy486. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CircularPointArray : NSObject
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
+ (NSString *) platform;
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
//
// UIImage+AverageColor.h
//
//
// Created by Richard Adem on 3/07/2015.
// Copyright (c) 2015 Richard Adem. All rights reserved.
//
#import <Foundation/Foundation.h>
@richy486
richy486 / button.py
Created September 3, 2014 05:30
Tweeting raspberry pi button
#!/usr/bin/env python
import sys
from twython import Twython
import RPi.GPIO as GPIO
import time
CONSUMER_KEY = '---- API key here ----'
CONSUMER_SECRET = '---- API secret here ----'
ACCESS_KEY = '---- Access token here ----'
@richy486
richy486 / button2.py
Last active September 21, 2015 08:42
Button with sound and auto tweet counter
#!/usr/bin/env python
import sys
print 'starting...'
from twython import Twython
from twython import TwythonError
import RPi.GPIO as GPIO
import time
@richy486
richy486 / android_debugging.txt
Last active September 24, 2015 15:53
Android debugging
# logcat in terminal
adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG
# log to file
adb shell logcat > log.txt
# list packages
adb shell pm list packages
# full path to package
@richy486
richy486 / vTag.sh
Created October 4, 2011 02:59
updates your Xcode 4 info.plist with the current git tag as version and commit number
# updates your info.plist with the current git tag as version and commit number
# in that tag as build numer, then ammends the changed file to git
# run this after your normal commit but before you push
#
# this to be placed in the same directory as the xcode project file
# info.plist to be in the path [folder with projectfile]/[project name]/[project name]-Info.plist
# git tags to be in the form of v[number]
#
# Don't forget to do chmod +x ~/whatever/vTag.sh
#
@richy486
richy486 / RectHelper.h
Created November 24, 2011 00:13
Some Macros for changing rects on one line
//
// RectHelper.h
//
// Created by Richard Adem on 24/11/11.
// Copyright (c) 2011 Richard Adem. All rights reserved.
//
// richy486@gmail.com
// twitter.com/richy486
//