Skip to content

Instantly share code, notes, and snippets.

@clifff
clifff / gist:4066937
Created November 13, 2012 16:51
Droid Bionic ADB Logs
11-12 14:31:14.553 497 797 I ActivityManager: Starting: Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=http://www.bruinsnation.com/2012/11/11/3631264/veterans-day-thank-you-to-all-who-serve cmp=com.android.browser/.BrowserActivity } from pid 2679
11-12 14:31:15.358 2679 2679 I browser : Console: Error: Too much time spent in unload handler. http://static.getclicky.com/js:1
11-12 14:31:15.413 2679 2681 D dalvikvm: GC_CONCURRENT freed 2084K, 47% free 5214K/9671K, external 3354K/3630K, paused 5ms+3ms
11-12 14:31:16.710 2679 2701 V SQLiteDatabaseWrapper: enter SQLiteDatabaseWrapper.insert()
11-12 14:31:17.936 2679 2679 I browser : Console: Starting to load [CreativeUnit banner (1)] http://www.bruinsnation.com/2012/11/11/3631264/veterans-day-thank-you-to-all-who-serve:518
11-12 14:31:17.936 2679 2679 I browser : Console: Phase 'generic' started. http://www.bruinsnation.com/2012/11/11/3631264/veterans-day-thank-you-to-all-who-serve:526
11-12 14:31:17.936 2679 267
@clifff
clifff / gist:4066952
Created November 13, 2012 16:55
HTC Thunderbolt ADB Log 2/3
I/PhoneInfo(12047): getLteLevel - lteRsrp: -1 lteCqi:-1
D/dalvikvm(14225): GC_CONCURRENT freed 3368K, 50% free 5921K/11655K, external 211K/532K, paused 2ms+3ms
D/dalvikvm(14225): GC_CONCURRENT freed 2250K, 60% free 4725K/11655K, external 211K/532K, paused 2ms+5ms
D/dalvikvm(14225): GC_CONCURRENT freed 661K, 60% free 4669K/11655K, external 211K/532K, paused 3ms+3ms
D/dalvikvm(14225): GC_CONCURRENT freed 599K, 61% free 4645K/11655K, external 211K/532K, paused 2ms+2ms
D/dalvikvm(14225): GC_CONCURRENT freed 551K, 60% free 4681K/11655K, external 211K/532K, paused 3ms+3ms
D/dalvikvm(14225): GC_EXPLICIT freed 210K, 61% free 4612K/11655K, external 211K/532K, paused 35ms
D/dalvikvm(14225): GC_EXTERNAL_ALLOC freed 27K, 61% free 4584K/11655K, external 211K/532K, paused 38ms
D/skia (14225): createPlugin (300,150) screen proportion:(w,h)=(0.813008,0.039288), content ratio:2.000000 mainUrl:http://athleticsnation.local:3000/
D/skia (14225): createPlugin F10 typical2 video content (300,150)/(369,3818), url=
@clifff
clifff / gist:4066973
Created November 13, 2012 16:56
HTC Thunderbolt ADB Logs
D/dalvikvm(14127): GC_CONCURRENT freed 1056K, 58% free 5146K/11975K, external 1168K/1313K, paused 3ms+6ms
D/skia (14127): purging 193K from font cache [28 entries]
D/skia (14127): createPlugin (300,150) screen proportion:(w,h)=(0.791557,0.057826), content ratio:2.000000 mainUrl:http://athleticsnation.local:3000/2012/10/23/3543068/simple-question-giants-or-tigers
D/skia (14127): createPlugin F10 typical2 video content (300,150)/(379,2594), url=
D/webcore (14127): [WebViewCore::handleMessage] handle msg=[4::120] over 1 sec. (1038.0
D/skia (14127): purging 193K from font cache [27 entries]
D/dalvikvm(14127): GC_CONCURRENT freed 1825K, 63% free 4497K/11975K, external 1168K/1313K, paused 3ms+6ms
D/webcore (14127): [WebViewCore::checkBlock] mHandleClass=3 mHandleMsgId=1 mHandleStartTime=385.0 hascode-0=1079596336
D/webcore (14127): [WebViewCore::checkBlock] == m_bIsPauseTimes=false, mLastHandleMsg=null --d1=1.352745715978E12 d2=948.0
W/ContentService( 1646): binderDied() at ObserverNode name allowed_geo
@clifff
clifff / gist:4171017
Created November 29, 2012 18:39
URI.parse vs regex
require 'URI'
require 'benchmark'
include Benchmark
urls = %W{
http://www.theverge.com/posts/comment
http://www.thefalcoholic.com/posts/ajax_comments_update/3468659?last_version=128
http://www.polygon.com/game/dead-island-riptide/3635
http://www.arrowheadpride.com/rss2/index.xml
http://www.broadstreethockey.com/
@clifff
clifff / comments.json
Last active December 12, 2015 01:38
Comment mapping
This file has been truncated, but you can view the full file.
{"1359925200":[{"timestamp":1359925200,"community_id":117,"lat":38.0,"long":-97.0},{"timestamp":1359925200,"community_id":46,"lat":40.675899505615234,"long":-73.7968978881836},{"timestamp":1359925200,"community_id":378,"lat":41.777000427246094,"long":-72.52359771728516},{"timestamp":1359925200,"community_id":260,"lat":42.72840118408203,"long":-73.69180297851562},{"timestamp":1359925200,"community_id":111,"lat":39.896400451660156,"long":-75.34629821777344},{"timestamp":1359925200,"community_id":162,"lat":30.452699661254883,"long":-91.06780242919922},{"timestamp":1359925200,"community_id":25,"lat":40.04859924316406,"long":-83.07260131835938},{"timestamp":1359925200,"community_id":270,"lat":41.70389938354492,"long":-72.54609680175781},{"timestamp":1359925200,"community_id":242,"lat":42.208099365234375,"long":-70.7750015258789},{"timestamp":1359925200,"community_id":144,"lat":39.16529846191406,"long":-86.52639770507812},{"timestamp":1359925200,"community_id":373,"lat":34.81679916381836,"long":-86.68250274658203},
@clifff
clifff / palindrome.rb
Last active December 16, 2015 07:49
string vs integer palindrome benchmarks
require 'benchmark'
def int_pal?(num)
n = num
reverse = 0
while (num > 0)
dig = num % 10
reverse = reverse * 10 + dig
num = num / 10
end
@clifff
clifff / C-large-1.in
Created April 21, 2013 16:33
Google Code Jam - Fair and Square Large Input 1
10001
1002001 1004006004002
14541 102030301
44944 1022325232202
1000001999901 1211124711121
2617287827163 4000008000005
1 101
1022325232201 1213326733121
44943 12345654321
42874 103045301
1.9.3p392 :003 > arr = []; arr[10000000000000001] = 1
irb(16545,0x7fff795b9180) malloc: *** mmap(size=80000000000004096) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
irb(16545,0x7fff795b9180) malloc: *** mmap(size=80000000000004096) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
NoMemoryError: failed to allocate memory
from (irb):3:in `[]='
from (irb):3
@clifff
clifff / dogs.markdown
Created October 9, 2013 20:48
dog gifs

@clifff
clifff / client_user_data.txt
Last active August 29, 2015 13:58
Private WPT setup
wpt_server=YOUR_PUBLIC_DNS wpt_location=EC2-WPT