Skip to content

Instantly share code, notes, and snippets.

Kevin Smith respectTheCode

  • App Press
  • Indianapolis, IN
Block or report user

Report or block respectTheCode

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am respectthecode on github.
  • I am respectthecode ( on keybase.
  • I have a public key ASBTaqVJ8ZMG_x1C7wJh1779mVrRBExcho6E66VlSYCBCQo

To claim this, I am signing this object:

View gist:421c329f3551321099d4
#import "APMapBoxLayer.h"
@implementation APMapBoxLayer {
MKMapView *_mapView;
MBXRasterTileOverlay *_rasterOverlay;
NSString *_mapId;
BOOL _usingOfflineMap;
BOOL _readyToDownload;
BOOL _didStartDownload;
View gist:16058b92a4bc6431377f
public class APMapboxLayer extends APLayer {
private MapView mMapView;
public APMapboxLayer(final Context context, final LayerDataSource data, final float density, final float scale, final View.OnClickListener hotspotClickListener) {
super(context, data, density, hotspotClickListener);
String mapId = data.getMapId();
if (mapId == null) {
respectTheCode / gist:3917501
Created Oct 19, 2012
Jakefile for building and packaging node-webkit
View gist:3917501
var fs = require("fs");
var path = require("path");
var async = require("async");
var jade = require("jade");
var stylus = require("stylus");
var paths = {
stylus: {src: "./styles", dest: "./build/styles"},
jade: {src: "./views", dest: "./build"},
javascripts: {src: "./javascripts", dest: "./build/javascripts"},
respectTheCode / static_server.js
Created Feb 27, 2012 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
View static_server.js
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs"),
mime = require("mime")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
respectTheCode / gist:1292465
Created Oct 17, 2011
This angularjs directive adds/removes a class if an expression is true. It requires jQuery and uses the expression syntax "(`expression`) ? `className` [: `className`]".
View gist:1292465
angular.directive("ng:class", function (expression, compiledElement) {
if (typeof(expression) == "string") {
if (expression.indexOf(",")) {
expression = expression.split(",");
} else {
expression = [expression];
return function (element) {
You can’t perform that action at this time.