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
//
// 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 / 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 / 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 / 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]
# simple osx web server
python -m SimpleHTTPServer 8080
@richy486
richy486 / FTButtonNode.swift
Created November 8, 2015 22:47
Button node for Sprite kit in swift 2.1
// Button node for Sprite kit in swift 2.1
// http://stackoverflow.com/questions/19082202/setting-up-buttons-in-skscene
import Foundation
import SpriteKit
class FTButtonNode: SKSpriteNode {
enum FTButtonActionType: Int {
case TouchUpInside = 1,