brew install tmux
Run tmux -CC
or tmux -CC attach
in iTerm2 and then menu is shown on terminal:
- ESC to detach
- C to run commands
- X to force quit
- L for log
brew install tmux
Run tmux -CC
or tmux -CC attach
in iTerm2 and then menu is shown on terminal:
#!/bin/bash | |
# try to kill existing process | |
ps aux | awk '/[s]sh -D 7070/ {print $2}' | xargs kill | |
# delay 1s | |
sleep 1 | |
# start SOCKS proxy | |
ssh -D 7070 -fN user@host |
/** | |
* @license | |
* Copyright (c) 2019 Jonathan Catmull. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: |
The aim of this gist is to fix the following informative post about uploading via XHR.
The first part is the HTML. First of all, you really don't need JavaScript to upload a file but you do need a proper form. Secondly, inputs in a form shouild have a name, because the name is what the server will receive: not IDs, names!
Following the fixed form part.
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
// Import all | |
import Rx from "rxjs/Rx"; | |
Rx.Observable | |
.interval(200) | |
.take(9) | |
.map(x => x + "!!!") | |
.bufferCount(2) | |
.subscribe(::console.log); |
<!DOCTYPE html> | |
<head> | |
<title>CSS Blending</title> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> | |
<div> | |
<input id="backdropColor" type="text" placeholder="Backdrop color, eg. #ffffff/white"><br> | |
<input id="sourceColor" type="text" placeholder="Source color, eg. #000000/black"><br> | |
<select name="blendingMode" id="blendingMode"></select> |
alias ls='ls -aGFh' | |
alias ll='ls -l' | |
git_repo() { | |
git rev-parse --is-inside-work-tree &> /dev/null | |
return $? | |
} | |
git_branch() { | |
git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' |
#! /bin/bash | |
CWD=`pwd` | |
printUsage() { | |
echo "gitr - Git for multiple repositories made easy!" | |
echo -e "Usage: gitr <branch|status|push|pull|fetch|merge|stash|checkout [options] [arguments]> [--repos <repo>...] [--gitr-base <path>]" | |
} | |
println() { | |
echo "$1" |