start new:
tmux
start new with session name:
tmux new -s myname
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
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
#!/bin/bash | |
#Author: Stephan Schmitz, https://github.com/eyecatchup, <eyecatchup@gmail.com> | |
#Based on work by: Michael Bianco, http://developer.mabwebdesign.com/, <software@mabwebdesign.com> | |
#Description: Bash script to create a pretty-printed version of a minified CSS file. | |
# Note: Requires GNU sed. See: http://www.gnu.org/software/sed//sed.html | |
#Usage: prettyCss.sh inputfile [outputfile] | |
# If [outputfile] is not given, pretty-printed CSS will be send to stdout. | |
SED_COMMAND=/bin/sed # NOTE: Change the SED_COMMAND variable value to the path to your GNU sed! |
(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.
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:
NB: Check out git subtree
/git submodule
and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.
Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.
The easiest way to get the ClamAV package is using Homebrew
$ brew install clamav
Before trying to start the clamd
process, you'll need a copy of the ClamAV databases.
Create a freshclam.conf
file and configure as so
# This is to install both on OS X if you don't want to use homebrew | |
# xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun | |
xcode-select --install | |
curl -O http://luajit.org/download/LuaJIT-2.0.4.zip | |
unzip LuaJIT-2.0.4.zip | |
cd LuaJIT-2.0.4 | |
make && make install | |
curl -O http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz |
# Borrowed from: | |
# https://github.com/silven/go-example/blob/master/Makefile | |
# https://vic.demuzere.be/articles/golang-makefile-crosscompile/ | |
BINARY = superdo | |
VET_REPORT = vet.report | |
TEST_REPORT = tests.xml | |
GOARCH = amd64 | |
VERSION?=? |