Skip to content

Instantly share code, notes, and snippets.


Ohgyun Ahn ohgyun

View GitHub Profile
View Makefile
# Hello, and welcome to makefile basics.
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
# Once you're done here, go to
# to learn SOOOO much more.
ohgyun /
Last active Jun 18, 2019
꿀벌개발일지 검색 알프레드
# encoding: utf-8
import sys
import os
from workflow import Workflow3, web
ohgyun / notebook.tpl
Created Sep 28, 2018
Jupyter notebook template
View notebook.tpl
{%- extends 'basic.tpl' -%}
{%- block header -%}
<!DOCTYPE html>
{%- block html_head -%}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,target-densitydpi=medium-dpi,viewport-fit=cover">
<meta name="format-detection" content="telephone=no,address=no,email=no"/>
ohgyun / webpack.config.js
Created Feb 3, 2018 — forked from ayastreb/webpack.config.js
Build Chrome Extension with React using Webpack
View webpack.config.js
const path = require('path')
const webpack = require('webpack')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = {
// Entry files for our popup and background pages
entry: {
popup: './src/popup.js',
ohgyun /
Created Oct 8, 2015 — forked from paulirish/
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.


Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
ohgyun / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Here are a list of headless browsers that I know about:

  • [HtmlUnit][1] - Java. Custom browser engine. JavaScript support/DOM emulated. Open source.
  • [Ghost][2] - Python only. WebKit-based. Full JavaScript support. Open source.
  • [Twill][3] - Python/command line. Custom browser engine. No JavaScript. Open source.
  • [PhantomJS][4] - Command line/all platforms. WebKit-based. Full JavaScript support. Open source.
  • [Awesomium][5] - C++/.Net/all platforms. Chromium-based. Full JavaScript support. Commercial/free.
  • [SimpleBrowser][6] - .Net 4/C#. Custom browser engine. No JavaScript support. Open source.
  • [ZombieJS][7] - Node.js. Custom browser engine. JavaScript support/emulated DOM. Open source.
  • [EnvJS][8] - JavaScript via Java/Rhino. Custom browser engine. JavaScript support/emulated DOM. Open source.
ohgyun / trello.point.js
Created Apr 23, 2014
트렐로 추정 시간 표시
View trello.point.js
(function () {
var rPoint = /\[([0-9.]+)\]/g;
$('.list').each(function (i, list) {
var $title = $(list).find('.list-card-title:visible');
var total = 0;
$title.each(function (j, title) {
var str = $(title).text();
while (rPoint.test(str)) {
ohgyun / isChosungMatch.js
Created Apr 3, 2014
초성 비교 (초성과 완성된 문자열을 비교한다)
View isChosungMatch.js
function isChosungMatch(query, target) {
var lq = query.length; // length of query
var lt = target.length; // length of target
var ldiff = lt - lq; // length diff
var it = 0; // index of target
var iq = 0; // index of query
var cq; // character of query
var ct; // character of target
// 쿼리가 없으면 모두 매칭했다고 본다
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist
$ cd /usr/src
$ wget
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget
You can’t perform that action at this time.