start new:
tmux
start new with session name:
tmux new -s myname
| function _common_section | |
| printf $c1 | |
| printf $argv[1] | |
| printf $c0 | |
| printf ":" | |
| printf $c2 | |
| printf $argv[2] | |
| printf $argv[3] | |
| printf $c0 | |
| printf ", " |
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| # ---------------------- | |
| # Status Bar | |
| # ----------------------- | |
| set-option -g status on # turn the status bar on | |
| set -g status-utf8 on # set utf-8 for the status bar | |
| set -g status-interval 5 # set update frequencey (default 15 seconds) | |
| set -g status-justify centre # center window list for clarity | |
| # set-option -g status-position top # position the status bar at top of screen | |
| # visual notification of activity in other windows |
| Below are the Big O performance of common functions of different Java Collections. | |
| List | Add | Remove | Get | Contains | Next | Data Structure | |
| ---------------------|------|--------|------|----------|------|--------------- | |
| ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array | |
| LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List | |
| CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array | |
Picking the right architecture = Picking the right battles + Managing trade-offs
| import java.util.ArrayDeque; | |
| import java.util.Queue; | |
| // a Java version for http://www.geeksforgeeks.org/shortest-path-in-a-binary-maze/ | |
| public class SearchMazeBFS { | |
| // BFS to find the shortest path between | |
| // a given source cell to a destination cell. | |
| public static final int ROW = 9; |