Skip to content

Instantly share code, notes, and snippets.

View ConstantineXVI's full-sized avatar

Andrew Paulin ConstantineXVI

View GitHub Profile

Keybase proof

I hereby claim:

  • I am constantinexvi on github.
  • I am acp_ (https://keybase.io/acp_) on keybase.
  • I have a public key ASCsYGmqaehIHLMbjHFWmnu6jhNPpDpysQw9hAci6RKxqAo

To claim this, I am signing this object:

#!/usr/bin/env ruby
# install the 'net-ping' gem and run
# Ctrl-C quits
require 'net/ping'
running = true
Signal.trap("SIGINT") {|x| running = false}
while running do
p = Net::Ping::HTTP.new('google.com')
p.ping
unless p.ping
curl -X POST -d '{"scopes": ["gist"], "note": "Codea Gister"}' https://api.github.com/authorizations
--- This will pull the Gister project into Codea for you
-- Instructions:
-- * Create a new project in Codea named Gister, leave it empty
-- * Create another project to bootstrap (name doesn't matter)
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters)
-- * Run, run again, then delete the bootstrap project
-- If all went well, you should have a Gister project now
function getJsonLib()
local tabs = listProjectTabs()
@ConstantineXVI
ConstantineXVI / embloginate.pl
Created December 3, 2012 18:44
Embloginate
#!/usr/bin/env perl
chdir($ARGV[0]);
my $doc = `rake new_post["$ARGV[2]"]`;
my $file;
my $pwd = `pwd`;
if ($doc =~ /(source\/_posts\/.*\.markdown)/) {
$file = $pwd . "/" . $1;
$file =~ s/\n//;
system("$ARGV[1] $file");
}
@ConstantineXVI
ConstantineXVI / gist:969377
Created May 12, 2011 20:30
Logcat dump of Netflix on CM7/Glacier
05-12 16:28:07.138: DEBUG/dalvikvm(1935): GC_EXPLICIT freed 20K, 49% free 3170K/6215K, external 0K/0K, paused 78ms
05-12 16:28:17.548: WARN/InputManagerService(1509): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40657b50
05-12 16:28:21.468: WARN/nf_event(3568): UI is listening for event nrdp-video-pause that application does not support!
05-12 16:28:21.608: INFO/ActivityManager(1509): Starting: Intent { cmp=com.netflix.mediaclient/.PlayerActivity (has extras) } from pid 3568
05-12 16:28:21.648: DEBUG/dalvikvm(3568): GC_EXPLICIT freed 377K, 53% free 3343K/6983K, external 1242K/1817K, paused 32ms
05-12 16:28:21.658: INFO/WindowManager(1509): Setting rotation to 1, animFlags=1
05-12 16:28:21.668: INFO/ActivityManager(1509): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=1/1/2 nav=3/1 orien=2 layout=34 uiMode=17 seq=10 themeResource=null}
05-12 16:28:21.778: INFO/PowerWidget(1590): Clearing any old widget stuffs
05-12 16:28:21.778: INFO/P
@ConstantineXVI
ConstantineXVI / gist:961594
Created May 8, 2011 19:03
Plume HC rotation crash
05-08 15:01:48.310: INFO/ActivityManager(130): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.levelup.touiteur/.TouiteurMain bnds=[208,975][304,1071] } from pid 226
05-08 15:01:48.350: DEBUG/SurfaceFlinger(130): screenshot: result = OK
05-08 15:01:48.350: DEBUG/WindowManager(130): readLidState, sw:1
05-08 15:01:48.350: DEBUG/WindowManager(130): adjustConfigurationLw, config:{ scale=1.0 imsi=0/0 loc=null touch=3 keys=1/1/2 nav=1/1 orien=P layout=0x10000014 uiMode=0x0} mLidOpen:0 config.hardKeyboardHidden:2
05-08 15:01:48.350: VERBOSE/Plume_1000(2189): onConfigurationChanged 1
05-08 15:01:48.360: VERBOSE/Plume_1000(2189): handleOrientationChange changed transaction true
05-08 15:01:48.360: DEBUG/AndroidRuntime(2189): Shutting down VM
05-08 15:01:48.360: WARN/dalvikvm(2189): threadid=1: thread exiting with uncaught exception (group=0x4025e760)
05-08 15:01:48.360: ERROR/AndroidRuntime(2189): FATAL EXCEPTION: main
05-08 15:01:48.360: ERROR/AndroidRun
@ConstantineXVI
ConstantineXVI / psx4droid-hc-crash.log
Created April 7, 2011 16:48
Logcat from psx4droid crash on Honeycomb/Xoom
04-07 12:46:43.850: INFO/ActivityManager(117): Displayed com.zodttd.psx4droid/.MainActivity: +575ms (total +10s58ms)
04-07 12:46:52.090: DEBUG/dalvikvm(11696): GC_EXPLICIT freed 238K, 44% free 7450K/13255K, paused 6ms+2ms
04-07 12:46:57.110: DEBUG/dalvikvm(776): GC_EXPLICIT freed 90K, 34% free 10854K/16263K, paused 9ms+3ms
04-07 12:47:07.500: DEBUG/dalvikvm(11686): GC_CONCURRENT freed 656K, 11% free 6953K/7751K, paused 2ms+2ms
04-07 12:47:07.560: DEBUG/dalvikvm(11686): GC_CONCURRENT freed 507K, 11% free 6958K/7751K, paused 1ms+2ms
04-07 12:47:07.630: DEBUG/dalvikvm(11686): GC_CONCURRENT freed 491K, 11% free 6961K/7751K, paused 1ms+2ms
04-07 12:47:07.680: DEBUG/dalvikvm(11686): GC_CONCURRENT freed 515K, 11% free 6956K/7751K, paused 2ms+2ms
04-07 12:47:07.740: DEBUG/dalvikvm(11686): GC_CONCURRENT freed 518K, 11% free 6948K/7751K, paused 2ms+2ms
04-07 12:47:07.800: DEBUG/dalvikvm(11686): GC_CONCURRENT freed 502K, 11% free 6957K/7751K, paused 2ms+2ms
04-07 12:47:07.820: DEBUG/SurfaceFlinger(117): screenshot: sw=2