Skip to content

Instantly share code, notes, and snippets.

View suewonjp's full-sized avatar

Suewon Bahng suewonjp

View GitHub Profile
@neunhoef
neunhoef / docker-compose.yml
Created December 7, 2016 11:08
Docker compose file to start a local arangodb cluster
version: '2'
services:
agency:
image: arangodb/arangodb
environment:
- ARANGO_NO_AUTH=1
command: arangod --server.endpoint tcp://0.0.0.0:5001 --server.authentication false --agency.activate true --agency.size 1 --agency.supervision true --database.directory /var/lib/arangodb3/agency1
coordinator:
image: arangodb/arangodb
@suewonjp
suewonjp / Open_iTerm2.txt
Last active July 28, 2016 13:45
[Mac OS X Tip] Open a new iTerm tab from the current folder in Finder
on run {input, parameters}
tell application "Finder"
set dir_path to quoted form of (POSIX path of (folder of the front window as alias))
end tell
CD_to(dir_path)
end run
on CD_to(theDir)
tell application "iTerm"
activate
@raine
raine / tmux-zoom-out-vim
Last active May 3, 2020 12:42
tmux+vim: zoom into pane and resize windows to equal size in vim with CTRL-W =
#!/usr/bin/env bash
set -e
cmd="$(tmux display -p '#{pane_current_command}')"
cmd="$(basename "${cmd,,*}")"
tmux resize-pane -Z
if [ "${cmd%m}" = "vi" ]; then
sleep 0.1
@nolanlawson
nolanlawson / index.html
Last active April 2, 2023 19:44
Creating a database
<html>
<body>
<pre id="display"></pre>
<script src="//cdn.jsdelivr.net/pouchdb/latest/pouchdb.min.js"></script>
<script src="index.js"></script>
</body>
</html>
@jeromeetienne
jeromeetienne / dieassert.js
Created May 10, 2012 08:32
a console.assert which actually stop the execution
/**
* A console.assert which actually stop the exectution.
* default console.assert() is a plain display, such as console.log() or console.error();
* It doesnt stop the execution like assert() is meant to do. This is a little code to
* "workaround this limitation" :) thanks @jensarp
*
* Usage:
* console.assert(foo === bar); // Will throw if not equal
* console.assert(foo === bar, 'Dude, foo does not equal bar'); // Will throw with custom error message
*