Skip to content

Instantly share code, notes, and snippets.

View ubolonton's full-sized avatar
🛠️

Tuấn-Anh Nguyễn ubolonton

🛠️
View GitHub Profile
(add-to-list 'auto-mode-alist '("\\.jsx$" . web-mode))
(defadvice web-mode-highlight-part (around tweak-jsx activate)
(if (equal web-mode-content-type "jsx")
(let ((web-mode-enable-part-face nil))
ad-do-it)
ad-do-it))
gulp.task("js:crypto", function() {
var browserify = require("browserify");
var source = require("vinyl-source-stream");
var b = browserify({
basedir: "./"
});
b.require("crypto", {expose: "crypto"});
return b.bundle()
.pipe(source("crypto.js"))
.pipe(gulp.dest(jsOutPath));
(defun ublt/define-keys (key-map &rest ps)
"Define key binding pairs for KEY-MAP."
(let ((i 0))
(while (< i (length ps))
(if (= (mod i 2) 0)
(let ((src (elt ps i))
(dst (elt ps (1+ i))))
(define-key key-map
(read-kbd-macro src) (if (stringp dst)
(read-kbd-macro dst)