Skip to content

Instantly share code, notes, and snippets.

View hc5duke's full-sized avatar

Hwan-Joon Choi hc5duke

View GitHub Profile

Note: This appears to be fixed now

It seems Screen Capture Chrome extension causes imo.im to not load. This is repeatable by toggling the extension and refreshing imo.im while logged in. There are actually two issues here that I noticed:

  1. Uncaught TypeError: Cannot read property 'length' of null - this appears to be related to the extension, happens inside the imo angular module, so I'm not entirely sure. It's the last line here:
if (Os.which === Os.MAC) {
  _ref = document.styleSheets;
 _results = [];
var http = require("http");
http.createServer(function(request, response) {
'use strict';
response.writeHead(200, {"Content-Type": "text/plain"});
response.write(request.headers['accept-language']);
response.end();
}).listen(8888);
@hc5duke
hc5duke / test.js
Last active August 29, 2015 14:01
console.log(234);
alert(21);
return false;
@hc5duke
hc5duke / curl.sh
Created June 9, 2014 01:30
curl yhoo
curl "http://query.yahooapis.com/v1/public/yql?format=json&q=select%20*%20from%20html%20where%20url%3D%22http%3A%2F%2Fdev.markitondemand.com%2FApi%2Fv2%2FQuote%2Fjson%3Fsymbol%3Dyhoo%22"
# {"query":{"count":1,"created":"2014-06-09T01:30:05Z","lang":"en-US","results":{"body":{"p":"{\"Status\":\"SUCCESS\",\"Name\":\"Yahoo! Inc\",\"Symbol\":\"YHOO\",\"LastPrice\":35.925,\"Change\":0.994999999999997,\"ChangePercent\":2.84855425135986,\"Timestamp\":\"Fri Jun 6 15:59:00 UTC-04:00 2014\",\"MSDate\":41796.6659722222,\"MarketCap\":36169577400,\"Volume\":1634239,\"ChangeYTD\":40.44,\"ChangePercentYTD\":-11.1646884272997,\"High\":36.08,\"Low\":35.05,\"Open\":35.07}"}}}}
<object type="application/x-shockwave-flash" data="//emp.bbci.co.uk/emp/SMPf/1.9.48/StandardMediaPlayerChromelessFlash.swf" width="100%" height="100%" id="smp-flashSWFemp-21451567-96466" style="visibility: visible; display: block !important;"><param name="quality" value="high"><param name="bgcolor" value="000000"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="wmode" value="opaque"><param name="flashvars" value="domId=emp-21451567-96466&amp;jsCallbackMethod=window.embeddedMedia.handle&amp;forceGuidance=&amp;today=2014/11/22 00:00:00 UTC&amp;isBSTime=false&amp;waitOnPluginLoad=undefined&amp;uxHighlightColour=#ff0000&amp;uxHighlightForeColour=#ffffff&amp;customRdotBaseURL=http://r.bbci.co.uk/e&amp;enableRdotReporting=true&amp;noTracking=undefined&amp;isTouchScreen=false&amp;embedReferer=&amp;embedPageUrl=http://www.bbc.com/news/world-africa-21444319&amp;embedPageQuery=&amp;customDAXURL=//sa.bbc.co.uk/bbc/bbc/s?&amp;enableDaxReporting=true&amp;enableSonarRep
### Keybase proof
I hereby claim:
* I am hc5duke on github.
* I am hc5duke (https://keybase.io/hc5duke) on keybase.
* I have a public key whose fingerprint is 85D2 953A FD27 1D06 0ED2 C8E8 4EDB D267 B1AF 59C7
To claim this, I am signing this object:
@hc5duke
hc5duke / bart_sked.rhtml
Created May 25, 2009 02:57
bart schedule for pleasanton-embarcadero, using ruby on apache
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>Bart</title>
<style type="text/css" media="screen">
div {max-width:300px;}
div.destination {font-size:24px;font-weight:bold;border:2px solid #00c;text-align:center;margin:0px -2px;}
div.estimates {padding-bottom:15px;}
@hc5duke
hc5duke / homework.rb
Created June 30, 2009 07:15 — forked from visnup/homework.rb
I copied visnup!
require 'rubygems'
require 'open-uri'
require 'json'
url = 'http://twitter.com/statuses/user_timeline.json?id=hc5duke&count=3200'
dates = open(url) { |f| JSON.parse f.read }.map { |e| Time.parse e['created_at'] }
sum = dates.inject(Hash.new(0)) { |s, t| s[t.strftime('%Y-%m-%d')] += 1; s }
total = 0
sum.keys.sort.each { |k| puts "#{k}\t#{sum[k]}\t#{total += sum[k]}" }
// hide status bar
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[application setStatusBarHidden:TRUE];
[window addSubview:controller.view];
[window makeKeyAndVisible];
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
NSLog(@"touch!");
}