Skip to content

Instantly share code, notes, and snippets.

Avatar

Hwan-Joon Choi hc5duke

View GitHub Profile
@hc5duke
hc5duke / 아래아-bookmarklet.js
Last active Jul 31, 2020
render 아래아 properly on jemin.com, based on jamocomposed_block class in https://ko.wikipedia.org/wiki/%E3%86%8D
View 아래아-bookmarklet.js
javascript:(function(){var s = document.createElement('style');s.appendChild(document.createTextNode('*{font-family:"본고딕","Source Han Sans K","본고딕 KR","Source Han Sans KR","思源黑體","Source Han Sans TC","思源黑體 香港","Source Han Sans HC","思源黑体","Source Han Sans SC","源ノ角ゴシック","Source Han Sans","본명조","Source Han Serif K","본명조 KR","Source Han Serif KR","思源宋體","Source Han Serif TC","思源宋體 香港","Source Han Serif HC","思源宋体","Source Han Serif SC","源ノ明朝","Source Han Serif","Noto Sans CJK KR","Noto Sans KR","Noto Sans CJK TC","Noto Sans CJK HC","Noto Sans CJK SC","Noto Sans CJK JP","Noto Serif CJK KR","Noto Serif KR","Noto Serif CJK TC","Noto Serif CJK SC","Noto Serif CJK JP","나눔바른고딕 옛한글","NanumBarunGothic YetHangul","나눔명조 옛한글","NanumMyeongjo YetHangul","함초롬돋움 LVT","HCR Dotum LVT","함초롬바탕 LVT","HCR Batang LVT","은 바탕","Un Batang","돋움 옛한글","Dotum Old Hangul","바탕 옛한글","Batang Old Hangul","굴림 옛한글","NewGulim Old Hangul","궁서 옛한글","Gungsuh Old Hangul","맑은 고딕","Malgun Gothic","함초롬돋움","HCR Dotum","함초롬바탕","HCR Batang" !important;}'));doc
View gist:e3f47d4858a90732ea38
### 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:
View cnn.html
<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
View curl.sh
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}"}}}}
View test.js
console.log(234);
alert(21);
return false;
View app.js
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);
View imo_issues.md

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 = [];
View redick.tsv
11/14 BOSTON UNIVERSITY * 39 7-14 0-3 5-7 0-0 0 2 2 1 0 1 19
11/16 SETON HALL * 27 6-11 4-7 2-2 0-4 4 1 1 3 0 0 18
11/19 DAVIDSON * 36 10-18 4-6 5-5 0-0 0 0 1 2 0 1 29
11/23 vs. Drexel * 37 8-19 2-8 13-15 0-2 2 2 1 1 0 2 31
11/25 vs. Memphis * 36 4-9 3-3 4-5 0-2 2 2 3 3 0 1 15
11/30 at Indiana * 40 10-17 4-8 5-6 1-3 4 1 5 4 0 2 29
12/4 VIRGINIA TECH * 34 6-19 2-8 4-4 0-0 0 3 2 4 0 1 18
12/7 PENNSYLVANIA * 37 8-16 4-9 4-4 0-2 2 1 4 1 0 0 24
12/10 vs. Texas * 37 13-24 9-16 6-6 1-3 4 1 0 1 0 3 41
12/18 VALPARAISO * 33 9-15 5-9 7-9 0-1 1 1 1 1 0 2 30
@hc5duke
hc5duke / circle.yml
Created Mar 24, 2013
Using Karma/Testacular with CircleCI
View circle.yml
test:
pre:
- npm install -g karma
- nohup bash -c "karma start spec/javascripts/testacular.conf.js &"
override:
- bundle exec rspec spec
- karma run
@hc5duke
hc5duke / hash_default.rb
Created Dec 15, 2012
hash defaults don't work like that.
View hash_default.rb
> a = {}
# => {}
> a.default = []
# => []
> a[:b]
# => []
> a[:b] << 3
# => [3]
> a
# => {}