I hereby claim:
- I am spilliams on github.
- I am spilliams (https://keybase.io/spilliams) on keybase.
- I have a public key ASC-nLvw0qxmNspUoeU6mbw2vV9bR5UCHGEA1agrDefGQwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # simple ruby script to spit out x,y coords of points on a circle given properties | |
| require "highline/import" | |
| radius = Float(ask "radius? ") | |
| originX = Float(ask "X coord of center? ") | |
| originY = Float(ask "Y coord of center? ") | |
| minTheta = Float(ask "minTheta (deg)? ") * Math::PI/180 | |
| maxTheta = Float(ask "maxTheta (deg)? ") * Math::PI/180 | |
| dTheta = Float(ask "dTheta (rad)? ") * Math::PI/180 |
You're about to start a library or open-source thing that you want to be available to any iOS project. This is a handy guide for how to get set up.
#Setup
Ok, project exists. What now? Let's rip out all that boilerplate Xcode so graciously gave us.
#Bootstrapping An iOS App
Note: If you're bootstrapping a static lib project, read this gist instead.
##Project Setup
Constants.h, and #import "Constants.h" in the PCH| // | |
| // SWAppDelegate.h | |
| // lockstatenotificationstest | |
| // | |
| // Created by Spencer Williams on 1/17/13. | |
| // Copyright (c) 2013 Spencer Williams. All rights reserved. | |
| // | |
| #import <UIKit/UIKit.h> |
| /* flag links that don't go anywhere */ | |
| a[href = ""] { | |
| background: red; | |
| color: white; | |
| font-size: x-large; | |
| } | |
| /* flag absolute links */ |
| .show_on_phones, .show_on_tablets, .hide_on_desktop { | |
| display: none; | |
| } | |
| @media only screen and (max-width: 768px) and (min-width: 481px) { | |
| /* tablets only */ | |
| .show_on_tablets { | |
| display: block; | |
| } | |
| .show_on_desktop, .hide_on_tablets { |
| // replace instances of "myPlugin" with your plugin name | |
| (function($){ | |
| var methods = { | |
| init : function( options ) { | |
| var defaults = { | |
| }; | |
| var options = $.extend(defaults,options) | |
| return this.each(function() { |
| .leaflet-marker-pane .leaflet-clickable { | |
| position: absolute; | |
| top: -55px; /* depends on icon graphic */ | |
| left: -17px; /* depends on icon graphic */ | |
| } | |
| .leaflet-marker-pane .leaflet-clickable .number { | |
| position: absolute; | |
| top: 10px; /* depends on icon graphic */ | |
| width: 34px; /* depends on icon graphic */ | |
| text-align: center; |
| /*global document */ | |
| (function (ctx) { | |
| // Simple JavaScript Templating | |
| // John Resig - http://ejohn.org/ - MIT Licensed | |
| (function(){ | |
| var cache = {}; | |
| function tmpl(str, data){ | |
| // Figure out if we're getting a template, or if we need to | |
| // load the template - and be sure to cache the result. |