Skip to content

Instantly share code, notes, and snippets.

View jmjeong's full-sized avatar

Jaemok Jeong jmjeong

View GitHub Profile
@jmjeong
jmjeong / toc.py
Last active October 26, 2015 03:07
markdown toc generator
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# markdown toc generator, v1.8
#
# Jaemok Jeong, 2014/10/27
from AppKit import NSPasteboard, NSArray
import re
import argparse
"""Universal feed parser
Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds
Visit https://code.google.com/p/feedparser/ for the latest version
Visit http://packages.python.org/feedparser/ for the latest documentation
Required: Python 2.4 or later
Recommended: iconv_codec <http://cjkpython.i18n.org/>
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Jaemok Jeong, 2014/10/26
import feedparser
import re
import urllib
import os
import subprocess
@jmjeong
jmjeong / move to home-brew.sh
Created April 1, 2013 06:42
Move to home-brew from MacPorts
sudo port -f uninstall installed
sudo chown -R `whoami` /usr/local
sudo rm -rf /opt/local
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew doctor
brew install wget ispell w3m
@jmjeong
jmjeong / result
Created October 31, 2012 13:22
simul
0,109
1,110
2,100
3,104
4,94
5,94
6,104
7,99
8,106
9,91
(defun org-export-to-devonthink (arg)
"Call `org-export-to-devonthink` with output to a temporary buffer.
No file is created."
(interactive "P")
(let (content)
(org-export-as-html arg nil nil "*Org HTML Export*")
(switch-to-buffer "*Org HTML Export*")
(setq content (buffer-string))
(kill-buffer "*Org HTML Export*")
(setq content (replace-regexp-in-string (regexp-quote "\"") "\\\"" content t t))
;; Jaemok Jeong(jmjeong@gmail.com)
;;
;; [2010-05-20 Thu]
;;
;; Export org-file into html file and save it into DEVONthink Pro
(defun org-export-to-devonthink (arg)
"Call `org-export-to-devonthink` with output to a temporary buffer.
No file is created."
(interactive "P")
(defun current-itunes-song ()
(interactive)
(message
(do-applescript
"tell application \"iTunes\"
set currentTrack to the current track
set artist_name to the artist of currentTrack
set song_title to the name of currentTrack
return artist_name & \" - \" & song_title
end tell")))
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# purgegmail.py
#
# Google mail purge utility
# - delete all mail before purgeDate(datetime.date(2007,11,06))
#
# [2009-11-17 Tue] Jaemok Jeong(jmjeong@gmail.com)
#
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# purgegmail.py
#
# Google mail purge utility
# - delete all mail before purgeDate(datetime.date(2007,11,06))
#
# [2009-11-17 Tue] Jaemok Jeong(jmjeong@gmail.com)
#