Skip to content

Instantly share code, notes, and snippets.

@micrub
micrub / ajax.cljs
Last active August 29, 2015 14:07 — forked from mjg123/ajax.cljs
(def jquery (js* "$"))
(defn show [msg]
(let [data-as-json ((js* "JSON.stringify") msg nil 4)]
((js* "alert") data-as-json)))
(defn make-js-map
"makes a javascript map from a clojure one"
[cljmap]
(let [out (js-obj)]
@micrub
micrub / clojure-ctags.md
Last active June 30, 2016 23:21
Add Clojure support to exuberant ctags and vim-tagbar

ctags

Add the following to ~/.ctags (thanks, xzj / clojure.ctags):

--langdef=Clojure
--langmap=Clojure:.clj
--langmap=Clojure:+.cljx
--langmap=Clojure:+.cljs
--regex-clojure=/\([ \t]*create-ns[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/n,namespace/
--regex-clojure=/\([ \t]*def[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/d,definition/
@micrub
micrub / README.md
Created May 26, 2017 10:56 — forked from evandrix/README.md
Headless web browsers

Here are a list of headless browsers that I know about:

  • [HtmlUnit][1] - Java. Custom browser engine. JavaScript support/DOM emulated. Open source.
  • [Ghost][2] - Python only. WebKit-based. Full JavaScript support. Open source.
  • [Twill][3] - Python/command line. Custom browser engine. No JavaScript. Open source.
  • [PhantomJS][4] - Command line/all platforms. WebKit-based. Full JavaScript support. Open source.
  • [Awesomium][5] - C++/.Net/all platforms. Chromium-based. Full JavaScript support. Commercial/free.
  • [SimpleBrowser][6] - .Net 4/C#. Custom browser engine. No JavaScript support. Open source.
  • [ZombieJS][7] - Node.js. Custom browser engine. JavaScript support/emulated DOM. Open source.
  • [EnvJS][8] - JavaScript via Java/Rhino. Custom browser engine. JavaScript support/emulated DOM. Open source.
@micrub
micrub / jdk-squashfs-ramdisk-ubuntu.md
Last active January 5, 2018 00:54 — forked from lambdaverse/jdk-squashfs-ramdisk-ubuntu.md
JDK and Leiningen on ram disk with Ubuntu 14.04

Overview

  1. Create RAM disk
  2. Create JAVA + Leiningen squashfs image
  3. Mount Image to RAM disk and set it as permanent
  4. Set Java on RAM disk to be default and patch lein executable to read standalone jar from RAM disk.

Create RAM disk

Create RAM disk using tmpfs:

@micrub
micrub / neovim.md
Created February 16, 2018 22:00 — forked from humorless/neovim.md
How to install neovim in Ubuntu-14.04 & using terminal mode

Install neovim in ubuntu 14.04

sudo add-apt-repository ppa:neovim-ppa/unstable 
sudo apt-get update
sudo apt-get install neovim

Using terminal mode

  1. Enter terminal mode
@micrub
micrub / putty-gce.md
Created February 16, 2018 23:09 — forked from feczo/putty-gce.md
How to use Compute Engine - GCE with putty
@micrub
micrub / multiple_ssh_setting.md
Created August 24, 2018 02:30 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@micrub
micrub / ns-cheatsheet.clj
Created October 5, 2018 00:24 — forked from ghoseb/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;;
;; * :import refers Java classes to the current namespace.
;;
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.
@micrub
micrub / semantic-commit-messages.md
Created February 2, 2019 21:36 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example