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
(ns demo.list-view | |
"A ListView provides: | |
1. Refresh control | |
2. Pagination" | |
(:require [reagent.core :as reagent])) | |
(def ^:private default-bounce-height 100) | |
;;; Event Handlers | |
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 user/lisp-semicolon () | |
"Will insert a semicolon if we are at the beginning of the line, | |
otherwise will insert a colon." | |
(interactive) | |
(if (or (nth 3 (syntax-ppss)) | |
(save-mark-and-excursion | |
(while (equal (char-before) 59) | |
(backward-char)) | |
(equal (point) (line-beginning-position)))) | |
(call-interactively 'paredit-semicolon) |
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
;; Minimal setup for Clojure development & Org document. | |
(require 'package) | |
(setq package-enable-at-startup nil) | |
(setq package-archives | |
'(("gnu-cn" . "http://elpa.zilongshanren.com/gnu/") | |
("melpa-cn" . "http://elpa.zilongshanren.com/melpa/") | |
("melpa-stable-cn" . " http://elpa.zilongshanren.com/melpa-stable/") | |
("marmalade-cn" . "http://elpa.zilongshanren.com/marmalade/") |
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
(require '[clojure.set :refer [difference intersection]]) | |
(defn diff [x y k] | |
(let [xks (set (map k x)) | |
yks (set (map k y)) | |
y-map (zipmap (map k y) y) | |
x-map (zipmap (map k x) x) | |
cancel (difference xks yks) | |
commit-ks (difference yks xks) | |
commit (vec (vals (select-keys y-map commit-ks))) |
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
(ns mkd.core | |
(:require [reagent.core :as r :refer [atom]] | |
cljsjs.marked | |
[goog.style :as style] | |
[goog.dom :as dom] | |
[garden.core :refer [css]] | |
[garden.units :refer [percent px vh em]])) | |
(enable-console-print!) |
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
import org.codehaus.jettison.json.JSONObject; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Iterator; | |
import java.util.List; | |
/** | |
* Created by DogLooksGood on 16/1/3. | |
* |
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
#!/usr/bin/env python | |
"""Edit a file in the host nvim instance.""" | |
import os | |
import sys | |
from neovim import attach | |
args = sys.argv[1:] | |
if not args: | |
print "Usage: {} <filename> ...".format(sys.argv[0]) |
NewerOlder