Skip to content

Instantly share code, notes, and snippets.

View donburks's full-sized avatar

Don Burks donburks

View GitHub Profile
@donburks
donburks / AppDelegate.m
Created November 30, 2012 18:44
AppDelegate
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@donburks
donburks / gist:4198056
Created December 3, 2012 21:08
Crash output, throws SIGABRT
2012-12-03 13:08:08.048 Nickler[78828:15b03] Multi-tasking -> Device: YES, App: YES
2012-12-03 13:08:08.083 Nickler[78828:15b03] -[UAAppDelegateSurrogate application:supportedInterfaceOrientationsForWindow:]: unrecognized selector sent to instance 0xa835710
2012-12-03 13:08:08.084 Nickler[78828:15b03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UAAppDelegateSurrogate application:supportedInterfaceOrientationsForWindow:]: unrecognized selector sent to instance 0xa835710'
*** First throw call stack:
(0x22b012 0x28b5e7e 0x2b64bd 0x21abbc 0x21a94e 0x46b332 0x55366d 0x55372e 0x553eda 0x49c435 0x49bf11 0x49bb2a 0x156edc9 0x2850c5 0x1dfefa 0x14a3482 0x6429be 0x4654a9 0x476315 0x47724b 0x468cf8 0x3664df9 0x3664ad0 0x1a0bf5 0x1a0962 0x1d1bb6 0x1d0f44 0x1d0e1b 0x4647da 0x46665c 0x3216 0x3145 0x1)
libc++abi.dylib: terminate called throwing an exception
(lldb)
@donburks
donburks / UAAppDelegateSurrogate.m
Created December 3, 2012 21:55
After code fix applied
#import "UAAppDelegateSurrogate.h"
@interface UAAppDelegateSurrogate()
@property (nonatomic, readwrite, copy) NSDictionary *launchOptions;
@end
@implementation UAAppDelegateSurrogate
function on_reg(error, pushID) {
if (!error) {
alert("Reg Success: " + pushID)
}
}
function onDeviceReady() {
//UA push setup
push = window.pushNotification;
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
@donburks
donburks / w1d4-hw.md
Last active August 29, 2015 14:01 — forked from kvirani/w1d4-hw.md

On the road to being a Power User

Take control of your development environment by using more of the keyboard and less of the mouse/trackpad. As you write your code, use (Mac and Sublime) keyboard commands/shortcuts to, well... kill it!

Mastering your text editor and Operating System (OS) will make you a more efficient and impressive developer.

Power User Commands

Don't just read about these. If any of these are foreign / unfamiliar to you, be sure to practice them and make a mental note to use them when possible.

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@donburks
donburks / webdev-newsletters.md
Created October 14, 2014 20:36
Web Dev Newsletters

Stay up to date

In our world, staying current is key. Being aware of the emerging trends, the current technologies, and the thought leaders in our space is imperative to staying relevant and being an asset to an employer, or being able to innovate in your own company or project.

Below are some e-mail newsletters which I highly recommend for maintaining your current knowledge and awareness.

Web Technologies

@donburks
donburks / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# An edit distance (e.d.) is defined as how many times you need to replace, add, or remove characters to match two strings.
# E.G. "train" and "brain" have e.d.=1
# "train" and "rain" have e.d.=1
# "train" and "trains" have e.d.=1
# Write a method that returns TRUE if edit distance is exactly 1, FALSE if not.
# Author: Murat Ayfer
def edit_distance_is_one(word1, word2)
i1 = 0