Skip to content

Instantly share code, notes, and snippets.

View netj's full-sized avatar

Jaeho Shin netj

View GitHub Profile
@netj
netj / a.txt
Created September 1, 2010 06:53
Genetic Algorithm for Number Bi-partitioning
100000
6488
13757
16483
29204
31021
70
1887
3704
5522
@netj
netj / csv2tsv.py
Created August 16, 2010 14:38
CSV to TSV python one-liner
#!/usr/bin/env python
import sys,csv
for row in csv.reader(sys.stdin):
print "\t".join(row)
@netj
netj / memusg
Last active May 23, 2025 07:37
memusg -- Measure memory usage of processes
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <[email protected]>
# Created: 2010-08-16
############################################################################
# Copyright 2010 Jaeho Shin. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
@netj
netj / customize
Created June 13, 2010 11:21
Substitute contents and names of given files
#!/usr/bin/env bash
# customize -- Substitute contents and names of given files
#
# Usage:
# customize DEST [FILE...] <<RULES
# Name=Foo
# Version=1.0
# RULES
#
#
@netj
netj / git-mark-empty-dirs
Created June 13, 2010 11:17
Mark empty dirs in a git repo with .gitignore files
#!/usr/bin/env bash
# git-mark-empty-dirs -- Mark empty dirs in a git repo with .gitignore files
# Author: Jaeho Shin <[email protected]>
# Created: 2009-12-03
set -e
remove-or-mark() {
local d=$1; shift
interact() {
echo "Found empty dir: \`$d'"
@netj
netj / blinker
Created May 25, 2010 06:18
an effective tool for instilling vocabularies into your brain
#!/bin/bash
# The "Blinker" (or "깜빡이" in Korean) for Mac
# an effective tool for instilling vocabularies into your brain
#
# Usage: blinker [-OPTION...] SET...
#
# SET is the path to a file where each of its line contains a word and its
# definition separated by tab character. You can get lots of quality sets
# from http://quizlet.com/.
#
@netj
netj / take-a-break-with
Created May 17, 2010 06:52
Take-a-Break script for the Mac user's health
#!/bin/bash
# take-a-break-with -- Take-a-Break script for the Mac user's health
#
# Schedule calling this script regularly from your crontab:
#
# */60 * * * * take-a-break-with Dashboard
#
# When a Growl bubble comes up, click it and take a break! :)
#
# You need to get and install Growl from: http://growl.info/