Skip to content

Instantly share code, notes, and snippets.

@shouya
shouya / .emacs
Created September 22, 2012 07:28
My emacs init configuration
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(column-number-mode t)
'(default-input-method (quote chinese-zozy))
'(mediawiki-site-default "My Private Wiki")
'(safe-local-variable-values (quote ((encoding . gbk) (encoding . utf-8)))))
@visnup
visnup / lock.css
Created May 5, 2012 20:31
"lock" orientation of a website for mobile (iPad, iPhone)
/* if portrait mode is detected, rotate the entire site -90 degrees to hint rotating to landscape */
@media (orientation: portrait) {
body {
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
transform: rotate(-90deg);
}
}
@andyoakley
andyoakley / gist:1651859
Created January 21, 2012 07:10
Simple PivotTable in Powershell
# Rotates a vertical set similar to an Excel PivotTable
#
# Given $data in the format:
#
# Category Activity Duration
# ------------ ------------ --------
# Management Email 1
# Management Slides 4
# Project A Email 2
# Project A Research 1