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 / randomBashCommands.txt
Last active June 22, 2016 17:30
Random bash commands
# copy source folder over the top of destination folder without deleting the destination
ditto -v /path/to/source/folder /path/to/destination/folder
# list all processes of application
ps -ax | grep [application name]
# kill all processes with tty
killall -t [tty number]
@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
//
// UIImage+AverageColor.h
//
//
// Created by Richard Adem on 3/07/2015.
// Copyright (c) 2015 Richard Adem. All rights reserved.
//
#import <Foundation/Foundation.h>
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
+ (NSString *) platform;
@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
//
// NSString-truncateToSize
// Fast Fonts
//
// Created by Stuart Shelton on 28/03/2010.
// Copyright 2010 Stuart Shelton.
//
// NSString truncate function for Objective C / iPhone SDK by
// Stuart Shelton is licensed under a Creative Commons Attribution 3.0
// Unported License (CC BY 3.0)
@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 / 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 / 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 ----'