Skip to content

Instantly share code, notes, and snippets.

I enjoy

Taeho Kim dittos

I enjoy
Block or report user

Report or block dittos

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
dittos / gist:8802445
Last active Aug 29, 2015
Custom Twitter CSS
View gist:8802445
@namespace url(;
@-moz-document domain("") {
.is-preview img {
transition: 0.2s linear opacity;
.stream-item:not(.open) .is-preview,
.stream-item:not(.open) .multi-photo {
View gist:b85564b263d637d33ee2
var PENDING = 0,
export var PromiseMixin = {
getInitialState: function() {
return {promiseState: PENDING};
componentWillMount: function() {
View gist:a5550bfbf9cecff2aa22
/** @jsx React.DOM */
import React from 'react';
var popupId = 0;
function addStyle(doc, cssCode) {
var styleElement = doc.createElement("style");
styleElement.type = "text/css";
var head = doc.getElementsByTagName("head")[0];
View gist:ce26fdf91c7855ebd07f
var NewStatus = React.createClass({
render: function() {
return <div className="new-status">
<h2>New monolog</h2>
<form action="" onSubmit={this.handleSubmit}>
<textarea ref="text" /><br />
<input type="submit" value="Post" />
dittos / gist:60e80da8e8d11b475c9f
Created Aug 12, 2014
Example Upstart Configuration
View gist:60e80da8e8d11b475c9f
start on runlevel [2345]
stop on runlevel [016]
setuid www-data
setgid www-data
env PORT=11000
chdir /home/ditto/animeta
exec env/bin/gunicorn animeta.wsgi --bind$PORT --error-logfile -
class Handler(BaseHandler):
def db(self):
if not hasattr(self, '_db'):
self._db = Session(
return self._db
def teardown_request(self):
db = getattr(self, '_db', None)
if db:
dittos / IconButton.rsx
Last active Aug 29, 2015
React Component Container Format
View IconButton.rsx
name: IconButton
required: true
type: string
description: A button text.
example: Click Me!
required: true
type: string
dittos /
Last active Aug 29, 2015
@Code_60: Sorting
import sys
from wand.image import Image
from wand.color import Color
from wand.drawing import Drawing
with Image(filename=sys.argv[1]) as img:
pixels = []
for row in img:
for col in row:
dittos / Relay
Last active Aug 29, 2015
Relay Internals
View Relay
View Task
  • 쓰레드가 N개인 쓰레드 풀이 있습니다.
  • 들어오는 태스크에는 Key가 있어서, Key가 같은 태스크끼리는 들어오는 순서대로 실행되어야 합니다.


Pool Size = 4
You can’t perform that action at this time.