Skip to content

Instantly share code, notes, and snippets.

View chitacan's full-sized avatar
:shipit:

Kyungyeol Kim (Bret) chitacan

:shipit:
View GitHub Profile
@chitacan
chitacan / vm.md
Last active August 22, 2020 07:15
node.js vm
@chitacan
chitacan / index.html
Last active September 30, 2017 17:12 — forked from darwin/index.html
XX
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/>
<script src="http://cmx.io/v/0.1/cmx.js"></script>
<body>
<scene id="scene1">
<drawing t="translate(0,31) rotate(1)">
<line stroke="black">
<point x="0" y="0"></point>
<point x="250" y="20"></point>
@chitacan
chitacan / ascii
Created March 9, 2013 16:51
ASCII art.
<!--
_______ _______ _______ _______ _______ _______ _______ ___ __
| _| | |_ _|_ _| _ | _| _ | \| |
| |_| |_| |_ | | | | |_| | |__
|_______|___|___|_______| |___| |___|___|_______|___|___|__|\___|__|
-->
<!--
_ _ _ _ _ _ _ _
| |/ |_ _ _ _ ___ ___| || | ___ ___| | | |/ (_) ____
@chitacan
chitacan / ascii(suseonpark)
Created March 10, 2013 04:43
ascii art for suseon park~
<!--
___ ___ ___ _
/ __/ _ _ / __/ ___ ___ ___ | _ \__ _ _ _| |_
\__ \| || |\__ \/ -_)/ _ \/ | | _/ _` | `_| ` /
/___/ \_,_|/___/\___|\___/__|_| |_| \__,_|_| |_,_\
-->
@chitacan
chitacan / activity_flow.txt
Created March 14, 2013 15:28
simple activity transition flow can be used in java source file.
// This are the transitions we want:
//
// +--------+ +------------+ +-------+ +----------+
// | Camera |---------->| Fullscreen |--->| Album |--->| AlbumSet |
// | View | thumbnail | Photo | up | Page | up | Page |
// +--------+ +------------+ +-------+ +----------+
// ^ | | ^ |
// | | | | | close
// +----------back--------+ +----back----+ +--back-> app
//
@chitacan
chitacan / siaf.sublime-snippet
Last active December 14, 2015 23:49
sublime text 2 siaf snippet.
<snippet>
<content><![CDATA[(function(){
${0}
}());]]></content>
<tabTrigger>siaf</tabTrigger>
<scope>source.js</scope>
<description>self invoke anonymous function</description>
</snippet>
@chitacan
chitacan / solarized_dark.sh
Created March 18, 2013 05:31
solarized dark for ubuntu gnome terminal.
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_background" --type bool false
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_colors" --type bool false
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/palette" --type string "#070736364242:#D3D301010202:#858599990000:#B5B589890000:#26268B8BD2D2:#D3D336368282:#2A2AA1A19898:#EEEEE8E8D5D5:#00002B2B3636:#CBCB4B4B1616:#58586E6E7575:#65657B7B8383:#838394949696:#6C6C7171C4C4:#9393A1A1A1A1:#FDFDF6F6E3E3"
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/background_color" --type string "#00002B2B3636"
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/foreground_color" --type string "#65657B7B8383"
package com.example.gdg_opensource_codelab_sample_1;
import android.os.AsyncTask;
import com.google.api.client.extensions.android.http.AndroidHttp;
import com.google.api.client.http.HttpRequest;
import com.google.api.client.http.HttpRequestInitializer;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.json.JsonFactory;
import com.google.api.client.json.gson.GsonFactory;
@chitacan
chitacan / start_time.java
Created April 16, 2013 14:05
get process start time from proc filesystem in java.
int pid = Process.myPid();
String statpath = "/proc/" + pid + "/stat";
a
try {
BufferedReader br = new BufferedReader(
new InputStreamReader(new FileInputStream(new File(statpath)))
);
String[] statline = br.readLine().split(" ");
// get system boot time
long bootime = System.currentTimeMillis() - SystemClock.elapsedRealtime();
@chitacan
chitacan / spotlight.js
Created August 7, 2013 16:02
spotlight chrome devtools snippet.
(function() {
if (document.querySelector('.spotlight')) {
power();
return;
}
var radius = 100;
var isOn = false;
var css = ".spotlight { \n\
position: fixed; \n\
top: 0; \n\