start new:
tmux
start new with session name:
tmux new -s myname
| ''' | |
| @author Michael J Bommarito II | |
| @date Feb 26, 2011 | |
| @license Simplified BSD, (C) 2011. | |
| This script demonstrates how to use Python to archive historical tweets. | |
| ''' | |
| import codecs | |
| import csv |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # play nice with OSX copy/paste tools | |
| set -g default-command "reattach-to-user-namespace /bin/bash --login" | |
| bind y run-shell "tmux save-buffer - | reattach-to-user-namespace pbcopy" | |
| # Reload the file with Prefix r | |
| bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
| bind | split-window -h # C-a | to create horizontal pane | |
| bind - split-window -v # C-a - to create vertical pane |
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrc| These code snippets have been tested on R 3.1.0 and Mac OS 10.9.3. They presumably do *not* work on R 2.X! | |
| ## Enter these commands in the Mac OS Terminal | |
| # use faster vecLib library | |
| cd /Library/Frameworks/R.framework/Resources/lib | |
| ln -sf /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib libRblas.dylib | |
| # return to default settings | |
| cd /Library/Frameworks/R.framework/Resources/lib |
| public class MyFragment { | |
| boolean loaded; | |
| private void maybeLoad() { | |
| if (!loaded && getUserVisibleHint()) { | |
| loaded = true; | |
| loadMyData(); | |
| } | |
| } | |
| @Override |
| With the OS X firewall enabled, you can remove the "Do you want the application "python" to accept incoming network connections?" message. | |
| Create a self-signed certificate. | |
| Open Keychain Access. Applications > Utilities > Keychain Access. | |
| Keychain Access menu > Certificate Assistant > Create a Certificate... | |
| Enter a Name like "My Certificate". | |
| Select Identity Type: Self Signed Root | |
| Select Certificate Type: Code Signing | |
| Check the Let me override defaults box |
Using markdown-service-tools, write markdown emails and convert to rich text via hot key before sending.
brew cask install markdown-service-tools
brew install multimarkdown
| library(data.table) | |
| ?`[.data.table` | |
| DT <- data.table(x=rep(c("b","a","c"),each=3), y=c(1,3,6), v=1:9) | |
| X <- data.table(x=c("c","b"), v=8:7, foo=c(4,2)) | |
| colnames(DT) | |
| # [1] "x" "y" "v" |