This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(evil-define-operator evil-capitalise (beg end type) | |
"Convert text to lower case." | |
(if (eq type 'block) | |
(evil-apply-on-block #'evil-capitalise beg end nil) | |
(capitalize-region beg end))) | |
(define-key evil-normal-state-map "gc" 'evil-capitalise) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-gnus-summary-view-html-alternative () | |
"Display the HTML part of the current multipart/alternative MIME message | |
in current default browser." | |
(interactive) | |
(save-current-buffer | |
(gnus-summary-show-article) | |
(set-buffer gnus-article-buffer) | |
(let ((file (make-temp-file "html-message-" nil ".html")) | |
(handle (nth 3 (assq 1 gnus-article-mime-handle-alist)))) | |
(mm-save-part-to-file handle file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function $(s){ | |
z="getElement";n="Name"; | |
a={"#" : z+"ById", | |
"." : z+"sByClass"+n, | |
}[s[0]]; | |
a=typeof a==="undefined"?[z+"sByTag"+n,0]:[a,1]; | |
return document[a[0]](s.slice(a[1])); | |
} | |
function $$(s){return S="slice",d=document,t=s[0],g="getElement",n="Name",t=="#"?d[g+"ById"](s[S](1)):t=="."?d[g+"sByClass"+n](s[S](1)):d[g+"sByTag"+n](s)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python | |
import urllib,json | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument( 'subreddit', nargs=1,help="Subreddit to browse, f.e. programming") | |
args= parser.parse_args() | |
subreddit = args.subreddit[0] | |
a = urllib.urlopen('http://www.reddit.com/r/'+str(subreddit)+'/.json') | |
try: |
NewerOlder