Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block khris

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
khris /
Created Jan 18, 2014
Alternative OAuth 1 implements for Twitter's hbc. It's compatible with joauth 6.0.+ so independent from Scala.
* Original:
* It is compatible with scala-less joauth 6.0.+, but hbc is not
* compatible with Android. #EpicFail
* Licensed under the Apache License, Version 2.0 (the "License");
khris / github_add_issues.js
Created Dec 18, 2013
Google Apps Script to add issues from spread sheet
View github_add_issues.js
function onOpen() {
var sheet = SpreadsheetApp.getActive();
var menuItems = [
{name: 'Add issues...', functionName: 'addIssues'}
sheet.addMenu('GitHub', menuItems);
function addIssues() {
var re = /^\[?.*\]?\s*(.*)$/;
khris / build.gradle
Last active Dec 17, 2015
(OUTDATED) Real Android appplication project with Gradle
View build.gradle
This boilerplate code is useless at least about importing dependencies for
support libraries and Google service libraries. See
[this post](
But it is useful for 3rd party libraries that doesn't `aar` yet.
khris / gist:4706798
Created Feb 4, 2013
Rust 0.5 build error on Archlinux x86-64
View gist:4706798
compile_and_link: x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/
/bin/sh: line 1: 12528 죽었음 x86_64-unknown-linux-gnu/stage0/bin/rustc --cfg stage0 -O --target=x86_64-unknown-linux-gnu -o x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/ /home/khris/builds/rust/src/rust-0.5/src/librustc/rustc.rc
make: *** [x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/] 오류 137
==> ERROR: A failure occurred in build().
khris / gist:4664150
Last active Dec 11, 2015
Cookie synchronization between WebView and HttpClient
View gist:4664150
CookieManager cookieManager = CookieManager.getInstance();
BasicCookieStore cookieStore = new BasicCookieStore();
final String appDomain = mContext.getResources().getString(R.string.app_domain);
String cookies = cookieManager.getCookie(appDomain);
String[] splitCookies = cookies.split(";");
for (String cookie : splitCookies) {
String[] cookieParts = cookie.split("=");
if (cookieParts.length > 0) {
String cookieValue = "";
if (cookieParts.length >= 2) {
View main.js
* It's under MPL 1.1
* See
* You can install this from
let { Ci, Cc } = require("chrome");
let Panel = require("panel").Panel;
khris / gist:2910153
Created Jun 11, 2012
fucking php gettext with js for gedit3
View gist:2910153
View kaist_chan.html
<!DOCTYPE html>
<head lang="ko">
<meta charset="UTF-8">
<script type="text/javascript">
function draw() {
var canvas = document.getElementById('kaist_chan');
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'rgba(22, 160, 220, 1)';
View gist:418f3cc31a5f4db61f01

Keybase proof

I hereby claim:

  • I am khris on github.
  • I am khris ( on keybase.
  • I have a public key whose fingerprint is BE0A 44C6 B37C 3B23 A891 785E E006 1B23 A3B1 BD0F

To claim this, I am signing this object:

khris / gist:f05dc3d3275ae5e8c7ae
Created Oct 8, 2014
Set a field name in a MongoDB document with dollar sign($)
View gist:f05dc3d3275ae5e8c7ae
{field1: 'value1'},
{$set: {'subdoc.$field_name_with_dollar_sign': 'value2'}}
You can’t perform that action at this time.