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
#!/bin/bash | |
# create session in background, name the session "first" | |
tmux new-session -d | |
# echo something | |
tmux send-keys "echo 'woot woot'" C-m | |
# name the window "foo" | |
tmux rename-window "foo" |
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
version: '2' | |
services: | |
api: | |
image: node:10 | |
working_dir: /opt | |
stdin_open: true | |
tty: true | |
volumes: | |
- ./api:/opt | |
ports: |
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
# First remove *all* keybindings | |
unbind-key -a | |
# Now reinsert all the regular tmux keys | |
# set-option -g prefix ` | |
# bind-key ` send-prefix | |
# set-option -g prefix C-b | |
# bind-key C-b send-prefix | |
# bind-key C-o rotate-window | |
# bind-key C-z suspend-client |
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
filetype off | |
syntax on | |
" Vundle Install | |
" launch vim, run :PluginInstall | |
" | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'christoomey/vim-tmux-navigator' |
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
var Bacon = require('baconjs'); | |
var stream = new Bacon.Bus(); | |
function keyF(event) { | |
return event.url; | |
} | |
function limitF(groupedStream, groupStartingEvent) { |
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
var app = express(); | |
// proxy the request to webpack server | |
app.use(proxy(url.parse('http://localhost:3000'))); | |
app.listen(3001, function (err) { | |
if (err) { | |
console.error(err); | |
} else { | |
console.log('proxy listening on 3001'); | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style> | |
#sidebar { | |
width:200px; | |
float:right; | |
background-color: green; |
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
variable/function names - why, not how | |
functions - tell, don't ask |
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
ab -n 200 -c 20 -H "Authorization: 123" "http://someurl.com" |
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
defmodule ArticleImporter.Server do | |
use GenServer | |
def start_link(_args \\ []) do | |
GenServer.start_link(__MODULE__, %{}, name: __MODULE__) | |
end | |
def init(state) do | |
:erlang.send_after(1000, __MODULE__, :tick) | |
{:ok, state} |
NewerOlder