Skip to content

Instantly share code, notes, and snippets.

View bobmoff's full-sized avatar

Fille bobmoff

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bobmoff on github.
  • I am bobmoff (https://keybase.io/bobmoff) on keybase.
  • I have a public key whose fingerprint is 7B1A 17FD 3E98 B2EF 0B65 4355 F53F FB62 8E92 C33C

To claim this, I am signing this object:

@bobmoff
bobmoff / gist:3755061
Created September 20, 2012 10:13
Heres how to manually set the Street name (title) etc on the Callout when using the new Apple Maps for directions.
NSDictionary *addressDict = @{(NSString *)kABPersonAddressStreetKey : @"THIS IS THE NAME OF THE STREET YOU WOULD LIKE TO SHOW"};
MKPlacemark *mapPlaceMark = [[MKPlacemark alloc] initWithCoordinate:placeMarkCoordinate addressDictionary:addressDict];
MKMapItem *mkMapItem = [[MKMapItemClass alloc] initWithPlacemark:mapPlaceMark];
NSMutableDictionary *launchOptions = [[NSMutableDictionary alloc] init];
[launchOptions setObject:MKLaunchOptionsDirectionsModeDriving forKey:MKLaunchOptionsDirectionsModeKey];
[mkMapItem openInMapsWithLaunchOptions:launchOptions];
// U need to import the native Addressbook framework as well to access the kABPersonAddressStreetKey constant which is set during runtime, i guess.
//
// RSTimingFunction.h
//
// Created by Raphael Schaad on 2013-09-28.
// This is free and unencumbered software released into the public domain.
//
#import <Foundation/Foundation.h>
#!/bin/sh
CURRENT=$(node -v)
VERSION=$(curl -L -s http://nodejs.org/dist/latest/ \
| egrep -o '[0-9]+\.[0-9]+\.[0-9]+' \
| tail -n1)
PLATFORM=linux
ARCH=x64
PREFIX="/usr/local"
@bobmoff
bobmoff / BouncyWall
Last active January 22, 2016 19:05
Bouncy wall physics behaviour for Cocktail Cruise
using UnityEngine;
using System.Collections;
public class Wall : MonoBehaviour {
Vector2 DesiredLocalPosition;
Quaternion DesiredRotation;
Transform DesiredTransform;
Rigidbody2D Body;
@bobmoff
bobmoff / UIView+Stacker.h
Created July 10, 2013 15:17
Stack subviews vertically ordered by their index. Good when u want to use XIB's and need to layout views (show/hide) based on external data, but cannot use autolayout.
#import <UIKit/UIKit.h>
@interface UIView (Stacker)
- (void)stackSubviews;
@end
@bobmoff
bobmoff / index.html
Last active February 18, 2017 13:55 — forked from anonymous/index.html
Positron
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Positron Preview</title>
<link rel="stylesheet" type="text/css" href="https://api.mapbox.com/mapbox-gl-js/v0.28.0/mapbox-gl.css" />
<script src="https://api.mapbox.com/mapbox-gl-js/v0.28.0/mapbox-gl.js"></script>
<style>
@bobmoff
bobmoff / Unity 3D Linux Standalone Build running in Docker
Last active June 27, 2017 00:24
Unity 3D Linux Standalone Build running in Docker (Development and Production)
This file exists only to make up the name of the gist
//
// SKNode+TouchPriority.h
// ButtonLab
//
// Created by Fille Åström on 10/20/13.
// Copyright (c) 2013 IMGNRY. All rights reserved.
//
#import <SpriteKit/SpriteKit.h>
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({