Skip to content

Instantly share code, notes, and snippets.

View exaos's full-sized avatar

Exaos Lee exaos

View GitHub Profile
@fasheng
fasheng / join-chinese.el
Last active April 18, 2023 09:27
Join consecutive Chinese lines into a single long line without unwanted space when exporting org-mode to html. Works on org-mode 8.x.
(defadvice org-html-paragraph (before fsh-org-html-paragraph-advice
(paragraph contents info) activate)
"Join consecutive Chinese lines into a single long line without
unwanted space when exporting org-mode to html."
(let ((fixed-contents)
(orig-contents (ad-get-arg 1))
(reg-han "[[:multibyte:]]"))
(setq fixed-contents (replace-regexp-in-string
(concat "\\(" reg-han "\\) *\n *\\(" reg-han "\\)")
"\\1\\2" orig-contents))
"""
Helper module for displaying ROOT canvases in ipython notebooks
Usage example:
# Save this file as rootnotes.py to your working directory.
import rootnotes
c1 = rootnotes.default_canvas()
fun1 = TF1( 'fun1', 'abs(sin(x)/x)', 0, 10)
c1.SetGridx()
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@exaos
exaos / el-emacs-zh-face.el
Last active March 21, 2022 10:27
My emacs face settings for Chinese environment. Emacs 字体设置,中英文同步缩放,大字符集显示。
;; mode: emacs-lisp; coding: utf-8
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; By: Exaos Lee
;; URL: https://gist.github.com/4493582
;; References:
;; - http://baohaojun.github.com/perfect-emacs-chinese-font.html
;; - http://fonts.jp/hanazono/
;; - http://ergoemacs.org/emacs/emacs_n_unicode.html
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@takumikinjo
takumikinjo / .gitignore
Created August 5, 2010 13:56
HTML5 Presentation export for Org-mode
README.html