Skip to content

Instantly share code, notes, and snippets.

Keewon Seo keewon

Block or report user

Report or block keewon

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
@keewon
keewon / test.rb
Created Feb 4, 2015
Convert Markdown slim to HTML
View test.rb
# Do 'gem install redcarpet'
# Usage:
# ruby test.rb > test.html
#
require 'slim'
s = File::open('markdown.html.slim').read()
View Change Texts in Photoshop using Python.py
# Requires Python 2.x, flask and pywin32
from flask import Flask
import flask
import win32com.client
import pythoncom
import os, os.path, sys, time
# Flask (Web Server)
ws = Flask(__name__)
View Developing Unreal Engine 4 Plugin for Mobile.md
@keewon
keewon / pubchem_2d_structure_json_to_svg.py
Last active Jun 21, 2017
Pubchem 2D structure json to SVG
View pubchem_2d_structure_json_to_svg.py
import os, sys, json, math
svg_width = 512
svg_height = 512
margin_x = svg_width / 10.0
margin_y = svg_height / 10.0
font_size = 16
charge_stroke_width=2.0
@keewon
keewon / fix_tapjoy_v2_dashboard_date_range_bug.js
Last active Jun 15, 2017
fix Tapjoy v2 dashboard date range bug
View fix_tapjoy_v2_dashboard_date_range_bug.js
/* https://dashboard.tapjoy.com/dashboard/v2/advertise/list?start=2017-05-23&end=2017-05-27&granularity=1.day&range=custom */
/* use this site to create bookmarklet - http://mrcoles.com/bookmarklet/ */
require.s.contexts._.defined['lib/models/ad_filter'].prototype.computeDates = function(range) {
var dateFormat, endDate, endDateString, isOneDayHourly, number_and_word_range, startDate, startDateString, timezone;
if (range == null) {
range = null
}
range || (range = this.get("range"));
number_and_word_range = /^(\d+)(\w+)$/.exec(range);
View google_photo_date.py
import os
from datetime import datetime
# Downloaded files from Google Photo have time in UTC.
# I want to change them to use my local timezone.
tzdiff = 3600 * 9 # my timezone is +09:00
for f in os.listdir('.'):
if '.JPG' in f or '.jpg' in f:
stinfo = os.stat(f)
View TapjoyUnitySample.cs
using UnityEngine;
using System.Collections;
using TapjoyUnity;
public class Tapjoy1 : MonoBehaviour {
int count = 0;
TJPlacement p;
// Use this for initialization
void Start () {
View rapidjson_regex_example.cpp
#include "rapidjson/document.h"
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
#include <cstdio>
#include <string>
#include <iostream>
//#include <regex>
#include <boost/regex.hpp>
using namespace rapidjson;
View pil_notification_icon.py
from PIL import Image
im = Image.open("ic_notify.png")
out = Image.new("RGBA", (96, 96))
pix = out.load()
blank = (0, 0, 0, 0)
white = (255, 255, 255, 255)
@keewon
keewon / MyUnityAppController.h
Last active Feb 25, 2016
Subclassing UnityAppController
View MyUnityAppController.h
//
// MyUnityAppController.h
//
#import "UnityAppController.h"
@interface MyUnityAppController : UnityAppController
@end
You can’t perform that action at this time.