Skip to content

Instantly share code, notes, and snippets.

View vehas's full-sized avatar
🎯
Focusing

Veha Suwatphisankij vehas

🎯
Focusing
  • Thailand
View GitHub Profile
@gorsuch
gorsuch / gist:1418850
Created December 1, 2011 18:37
clojure uuid
(defn uuid [] (str (java.util.UUID/randomUUID)))
@datagrok
datagrok / ergodox.md
Last active January 14, 2019 07:45
Reflections on my ErgoDox keyboard
@staltz
staltz / introrx.md
Last active June 7, 2024 23:39
The introduction to Reactive Programming you've been missing
@benjamin-smith
benjamin-smith / elasticsearch-local-development-with-docker-osx.md
Last active October 19, 2021 08:01
Develop locally with Elasticsearch on OSX using Docker

Develop locally with Elasticsearch on OSX using Docker

Docker

Docker does not run natively on OSX, only Linux. Docker Machine was created to add a Linux VM environment to run Docker containers on OSX. Install using Homebrew:

brew install docker
brew install docker-machine
docker-machine create
@hlung
hlung / vimium-dvorak-keys.txt
Last active June 8, 2017 03:15
Dvorak - Vimium Custom key mappings.This *unmaps* all keys and only adds frequently used ones.
# ::: Dvorak - Vimium Custom key mappings :::
# NOTE: This *unmaps* all keys and only adds frequently used ones.
# It mainly uses left hand keys so you don't have to let go of the mouse.
# How to use: open Vimium option screen, put this in "Custom key mappings" section.
 
unmapAll
 
# Link
map u LinkHints.activateMode
map U LinkHints.activateModeToOpenInNewTab
(defn my-get
"@param {*} m
@param {*} k
@return {nil|Object}"
[m k]
(get m k))
(defn foo
"@param {!Object} x" ;; non-nullable
[x] x)
(ns onyx-tx-report-queue
(:require [clojure.core.async :refer [>!! alts!! chan close! put! thread]]
[clojure.tools.logging :as log]
;; :all so clj-refactor doesn't remove it:
[onyx.plugin.core-async :refer :all]
[datomic.api :as d])
(:import [java.util.concurrent TimeUnit]))
(defn prepare-datom [db [e a v tx added]]
[e (d/ident db a) v tx added])
@dtinth
dtinth / _README.md
Last active January 21, 2016 16:41
My Atom hack for speed coding (for CodeHew 2016)

My Atom hack (init script) for speed programming in Ruby. This code is very ugly but works.

Features

Upon saving,

  • Ruby code in the specified directory is run.
  • Test input data (after 1st __END__ but before 2nd __END__) is sent to the script via stdin.
  • Output and/or errors are displayed in a popup.
  • Program output is compared to test output data (after 2nd __END__). If it matches, then the popup becomes green.