Skip to content

Instantly share code, notes, and snippets.

View ziggythehamster's full-sized avatar

Keith Gable ziggythehamster

View GitHub Profile
@ziggythehamster
ziggythehamster / austin_foursquare_spam.txt
Created January 2, 2011 06:42
Grant Riley, Douchebag, Spams Foursquare
Grant R.: Let me take the hassle out of your housing search. :) Where do you want to live? | urban squared realty | Grant Riley | 515 S. Congress, Suite 103. Austin. TX. 78704 | 512.761.7181 | www.fbook.me/gwr
foursquare_tip_id: 4d0575b092288eec1ef39be0
foursquare_user_id: 2838635
photo_url: http://playfoursquare.s3.amazonaws.com/userpix_thumbs/SOQVCR5HQWTFCRSL.jpg
name: Grant R.
@ziggythehamster
ziggythehamster / 01.md
Created November 30, 2011 22:30
@ziggythehamster's #Titanium #Sucks Proofs

@Appcelerator #Titanium #Sucks no. 1: Child view wider than a parent view breaks out of the parent. It should get cut off by the parent.

Diagram

If you have a box that's 40x40, and position another 40x40 box within it, with top=20 and left=20, you expect to see a 40x40 box containing a 20x20 box, not two 40x40 boxes.

Titanium sucks because...

If you put a view within a view on any widget toolkit, HTML, etc. and then move the subview around within its parent, the subview should never extend beyond the boundaries of its parent. That is, it should be clipped by its parent. At least by default. This is all OK if it's supposed to work this way, but several Q&A posts suggest this exact method as a way to crop a photo. So did it get broken at some point? Are there not unit tests to determine when behavior like this is reversed? Is some way that I'm inserting this view causing it not to work consistently? Why do I see code that is exactly equal to mine

@ziggythehamster
ziggythehamster / annoying_ti_bugs.md
Created December 14, 2011 17:52
Annoying @appcelerator #Titanium bugs
  • TIMOB-6300 - getLogicalDensityFactor not documented. Needed to support advanced positioning across all Android phones.
  • TIMOB-2229 - animate does not change properties. WONTFIX. I understand that values that aren't numerical (pixels) can't be changed and have it behave sanely, but that's why CSS has getComputedStyle. None of my coworkers thinks the official behavior makes sense at all without something like getComputedStyle.
  • TC-447 - Maybe I'm a documentation snob (RDocs kick ass), but Ti.Android.currentActivity should be listed as a property.
  • TIMOB-1910 - There needs to be a removeAllChildren because iterating the view's children and remove()ing them does not work.
  • TIMOB-1650 - items property of Toolbar undocumented. Fixed in 1.8, I
@ziggythehamster
ziggythehamster / 0001-Support-SGH-I997-Infuse-4G-in-UDEV-rules.patch
Created December 23, 2011 05:34
0001-Support-SGH-I997-Infuse-4G-in-UDEV-rules.patch
From 7f36f1aefe5aea73cf3e01890740f4005f808fb8 Mon Sep 17 00:00:00 2001
From: Keith Gable <[email protected]>
Date: Thu, 22 Dec 2011 23:28:31 -0600
Subject: [PATCH] Support SGH-I997 Infuse 4G in UDEV rules.
---
heimdall/60-heimdall-galaxy-s.rules | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/heimdall/60-heimdall-galaxy-s.rules b/heimdall/60-heimdall-galaxy-s.rules
@ziggythehamster
ziggythehamster / gist:2047126
Created March 15, 2012 21:33
Crawling itunes.apple.com
$ curl -A "mozilla/5.0" -v http://itunes.apple.com/us/app/the-far-islands-by-john-buchan/id327765949?mt=8
* About to connect() to itunes.apple.com port 80 (#0)
* Trying 63.97.127.24... connected
* Connected to itunes.apple.com (63.97.127.24) port 80 (#0)
> GET /us/app/the-far-islands-by-john-buchan/id327765949?mt=8 HTTP/1.1
> User-Agent: mozilla/5.0
> Host: itunes.apple.com
> Accept: */*
>
< HTTP/1.1 200 OK
@ziggythehamster
ziggythehamster / bootstrap-mobile.css
Created January 4, 2013 00:11
Adds some additional styles to Bootstrap for use on mobile
/* Bootstrap addtional styles */
.navbar-margin {
padding-top: 60px;
}
input.input-touch, .uneditable-input.input-touch {
height: 44px;
font-size: 17.5px;
}
@ziggythehamster
ziggythehamster / stacktrace.txt
Created January 22, 2013 16:48
RhoMobile Stack Trace
03-30 11:37:53.937: I/DEBUG(4025): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-30 11:37:53.937: I/DEBUG(4025): Build fingerprint: 'generic/ET1N1/ET1N1:2.3.4/01-271301-2272-0100-00-D1-090312/2272-090312:user/release-keys'
03-30 11:37:53.937: I/DEBUG(4025): pid: 4124, tid: 4142 >>> BUNDLE_ID_REDACTED <<<
03-30 11:37:53.937: I/DEBUG(4025): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
03-30 11:37:53.937: I/DEBUG(4025): r0 0798ae38 r1 00000000 r2 01490bc8 r3 00000000
03-30 11:37:53.937: I/DEBUG(4025): r4 00000001 r5 00000002 r6 008cff80 r7 0798ae38
03-30 11:37:53.937: I/DEBUG(4025): r8 0799e9b0 r9 00000000 10 00fdc020 fp 00000000
03-30 11:37:53.937: I/DEBUG(4025): ip 00000000 sp 46b17e80 lr 8133a558 pc 8133c19c cpsr 80000110
03-30 11:37:53.937: I/DEBUG(4025): d0 0000000100000018 d1 ffff760000031900
03-30 11:37:53.937: I/DEBUG(4025): d2 fffff9000000e800 d3 fffff88e0000e800
@ziggythehamster
ziggythehamster / bashlike.ps1
Created August 6, 2015 22:27
Bashlike PowerShell Prompt
function prompt {
$realLASTEXITCODE = $LASTEXITCODE
# Reset color, which can be messed up by Enable-GitColors
$Host.UI.RawUI.ForegroundColor = $GitPromptSettings.DefaultForegroundColor
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal( [Security.Principal.WindowsIdentity]::GetCurrent() )
& {
if ($currentPrincipal.IsInRole( [Security.Principal.WindowsBuiltInRole]::Administrator ))
{
@ziggythehamster
ziggythehamster / console.txt
Created August 6, 2015 22:34
Widescreen in Quake3-based games
seta r_customwidth "1680"
seta r_customheight "1050"
seta r_mode "-1"
vid_restart
en:
activemodel:
errors:
models:
"reservations/accepter":
attributes:
user:
requires_email_or_phone: 'your string'