Skip to content

Instantly share code, notes, and snippets.

View willrax's full-sized avatar
👨‍💻

Will Raxworthy willrax

👨‍💻
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@willrax
willrax / beacon.rb
Last active December 28, 2015 22:09
Small script to provision an iBeacon on the raspberry pi.
#!/usr/bin/env ruby
require "securerandom"
uuid = SecureRandom.uuid
uuid_hex = uuid.gsub("/", "")
uuid_hex = uuid_hex.scan(/../)
uuid_hex = uuid_hex.join(" ")
major = "00 00"
@willrax
willrax / app_delegate.rb
Created January 9, 2014 22:18
URL Scheme Management (RubyMotion)
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
@viewController = Foo.alloc.init
@window.rootViewController = @viewController
@window.rootViewController.wantsFullScreenLayout = true
@window.makeKeyAndVisible
true
end

Keybase proof

I hereby claim:

  • I am willrax on github.
  • I am willrax (https://keybase.io/willrax) on keybase.
  • I have a public key whose fingerprint is 925E CFEB 9783 0EAA 3FF1 38B0 C864 831F EC9D 5BDA

To claim this, I am signing this object:

static CSAnimationType CSAnimationTypeBounceLeft = @"bounceLeft";
static CSAnimationType CSAnimationTypeBounceRight = @"bounceRight";
static CSAnimationType CSAnimationTypeBounceDown = @"bounceDown";
static CSAnimationType CSAnimationTypeBounceUp = @"bounceUp";
static CSAnimationType CSAnimationTypeFadeIn = @"fadeIn";
static CSAnimationType CSAnimationTypeFadeOut = @"fadeOut";
static CSAnimationType CSAnimationTypeFadeInLeft = @"fadeInLeft";
static CSAnimationType CSAnimationTypeFadeInRight = @"fadeInRight";
static CSAnimationType CSAnimationTypeFadeInDown = @"fadeInDown";
static CSAnimationType CSAnimationTypeFadeInUp = @"fadeInUp";
@willrax
willrax / my_scene.rb
Last active August 29, 2015 14:01
Parallax scrolling with Sprite Kit and RubyMotion
# Video of it in action: http://cl.ly/VSIF
class MyScene < SKScene
def scroll_action(x, duration)
width = (x * 2)
move = SKAction.moveByX(-width, y: 0, duration: duration * width)
reset = SKAction.moveByX(width, y: 0, duration: 0)
SKAction.repeatActionForever(SKAction.sequence([move, reset]))
end
4.1 Uninstalling VCP Drivers
To remove the drivers from Mac OS X, the user must be logged on as root.
Root is a reserved username that has the privileges required to access all files.
Start a Terminal session (Go > Applications > Utilities > Terminal) and enter the following
commands at the command prompt:
cd /System/Library/Extensions
rm -r FTDIUSBSerialDriver.kext
@willrax
willrax / double.sh
Created July 24, 2014 10:15
AppleDouble
# Used to remove apple doubles before nas copying.
find . -type d | xargs dot_clean -m
@willrax
willrax / handoff.md
Created July 25, 2014 01:15
Setting up hand off.

source: http://forums.macrumors.com/showthread.php?t=1757410

I searched the Internet for hours trying to figure out how to get Hand off and Continuity and phone calls to work. I thought I'd put all that stuff in one place and hopefully save someone the trouble of trying to collect this information themselves.

Initial Steps:

-On your Mac go to About this Mac > System Report. Under the Bluetooth Category your LMP version needs to be 0x6.. Anything lower will not work.

-On Your Mac: Go to system preferences > General > and click the "allow handoff" box at the bottom.

# Generating bridgesupport files on the command line.
# via @markvillacampa (http://markvillacampa.com/2012/06/09/how-to-use-objective-c-libraries-with-rubymotion/)
gen_bridge_metadata -F complete --no-64-bit -c '-I.' *.h -o BridgeSupport.bridgesupport