Skip to content

Instantly share code, notes, and snippets.

View lolsborn's full-sized avatar

Steven Osborn lolsborn

  • Hillsboro, Oregon
View GitHub Profile
Could not find sbt-launch-0.7.3.jar in /Users/steven/.sbt, downloading...
--2010-05-18 20:50:15-- http://simple-build-tool.googlecode.com/files/sbt-launch-0.7.3.jar
Resolving simple-build-tool.googlecode.com... 74.125.155.82
Connecting to simple-build-tool.googlecode.com|74.125.155.82|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 920993 (899K) [application/x-java-archive]
Saving to: `/Users/steven/.sbt/sbt-launch-0.7.3.jar'
100%[=========================================================================================================================================>] 920,993 1.03M/s in 0.9s
[error] /Users/steven/Projects/UrbanAirship/NotificationCenter2/src_managed/main/scala/TR.scala:2: value app is not a member of package com.android
[error] import android.app.Activity
[error] ^
[error] /Users/steven/Projects/UrbanAirship/NotificationCenter2/src_managed/main/scala/TR.scala:3: value view is not a member of package com.android
[error] import android.view.View
[error] ^
[error] /Users/steven/Projects/UrbanAirship/NotificationCenter2/src_managed/main/scala/TR.scala:7: not found: type list
[error] val android:list = TypedResource[android.widget.ListView](R.id.android:list)
[error] ^
[error] /Users/steven/Projects/UrbanAirship/NotificationCenter2/src_managed/main/scala/TR.scala:7: not found: type list
== How to use demo: !PhoneGap with UA push ==
- Create a !PhoneGap project
- Download !PhoneGap [http://github.com/phonegap/phonegap-iphone here], and install it by following README.md
- Create a !PhoneGap project from Xcode !PhoneGap template.
- A good tutorial [http://idebuggedababoon.com/the-quick-start-guide-to-developing-iphone-applications-with-html-css-and-javascript-using-phonegap/ here]
- Add push notification implementation for iPhone.
- Create a folder named "Plugins" in your project folder if it does not exist. Add two files "!PushNotification.h", "!PushNotification.m", which should contain following code snippets. These are iPhone side push notification implementation. Then add these two files to Xcode project inside folder plugins, and set base SDK version for both project and !PhoneGapLib.xcodeproj
- !PushNotification.h
{{{
#import "PhoneGapCommand.h"
@lolsborn
lolsborn / gist:800848
Created January 28, 2011 20:04
django flash issue in 1.2.4
Traceback:
File "/Users/steven/Projects/readsync/readsync-web/lib/python2.6/site-packages/Django-1.2.4-py2.6.egg/django/core/handlers/base.py" in get_response
100. response = callback(request, *callback_args, **callback_kwargs)
File "/Users/steven/Projects/readsync/readsync-web/lib/python2.6/site-packages/Django-1.2.4-py2.6.egg/django/contrib/auth/decorators.py" in _wrapped_view
25. return view_func(request, *args, **kwargs)
File "/Users/steven/Projects/readsync/readsync-web/readsync_django/beanstalk/views.py" in ready
160. return _peek_if(request, 'ready', tube)
File "/Users/steven/Projects/readsync/readsync-web/readsync_django/beanstalk/views.py" in _peek_if
155. return inspect(request, tube_prefix='/beanstalk/%s/' % status, tube=tube)
File "/Users/steven/Projects/readsync/readsync-web/lib/python2.6/site-packages/Django-1.2.4-py2.6.egg/django/contrib/auth/decorators.py" in _wrapped_view
@lolsborn
lolsborn / gist:1331827
Created November 1, 2011 20:38
String split
airship1-2:tmp steven$ cat split.java
class Split {
public static void main(String [] args) {
String foo = "1::3";
String[] parts = foo.split("::");
for(int i =0; i < parts.length; i++) {
System.out.println(parts[i]);
}
@lolsborn
lolsborn / gist:1654136
Created January 21, 2012 21:40
Don't be Keith Moon
Do you know what a ZEPPELIN is? A zeppelin is also know as an airship. The
band Led Zeppelin got their name when the forming a new band. The drummer
from the band THE WHO [Keith Moon] said if I join your band it would go over
like a lead zeppelin. Keith stayed with The Wh. Who THE WHO is - is another
story. When Led zeppelin adopted their name they changed lead to led. As when
some one says they led the way. Thats how LED ZEPPELIN got their name. Led
Zeppelin went on to become the greatest rock and roll band of all times. i bet
keith moon wished he made a different decision. So now you know! when things
get hard and things tuff, don`t be a Keith Moon. because URBAN AIRSHIP can
become the greatest of all times.
@lolsborn
lolsborn / foo_test.py
Created June 14, 2012 17:36
sha1 manifest in json for [redacted]
#!/usr/bin/env python
import hashlib
import json
import glob
import sys
import os
pass_path = "%s/*" % sys.argv[1]
manifest = {}
@lolsborn
lolsborn / gist:4004266
Created November 2, 2012 20:59
Go session issue
func Logout(w http.ResponseWriter, r *http.Request) {
s, _ := Store.Get(r, SESSION_NAME)
s.Options = &sessions.Options{
MaxAge: -1,
}
s.Values["active"] = false // This is still true!??
s.Save(r, w)
http.Redirect(w, r, "/login/", 302)
@lolsborn
lolsborn / OneWire.cpp
Created June 3, 2013 06:23
Maple OneWire
/*
Copyright (c) 2007, Jim Studt (original old version - many contributors since)
The latest version of this library may be found at:
http://www.pjrc.com/teensy/td_libs_OneWire.html
OneWire has been maintained by Paul Stoffregen (paul@pjrc.com) since
January 2010. At the time, it was in need of many bug fixes, but had
been abandoned the original author (Jim Studt). None of the known
contributors were interested in maintaining OneWire. Paul typically
@lolsborn
lolsborn / OneWire.cpp.diff
Created June 3, 2013 06:29
Maple OneWire Diff
diff --git a/OneWire.cpp b/OneWire.cpp
index 631813f..01b901d 100644
--- a/OneWire.cpp
+++ b/OneWire.cpp
@@ -120,8 +120,8 @@ sample code bearing this copyright.
OneWire::OneWire(uint8_t pin)
{
pinMode(pin, INPUT);
- bitmask = PIN_TO_BITMASK(pin);
- baseReg = PIN_TO_BASEREG(pin);