start new:
tmux
start new with session name:
tmux new -s myname
| # requires root permissions in /usr/bin/ | |
| star = String.new | |
| 8.times { star += "*" } | |
| Star = "\n#{star * 3}\n" | |
| def newblock string | |
| puts "\n#{Star}#{string}#{Star}\n" | |
| end |
| # configuration for osx clipboard support | |
| set-option -g default-command "reattach-to-user-namespace -l sh" |
| #app/inputs/collection_check_boxes_input.rb | |
| class CollectionCheckBoxesInput < SimpleForm::Inputs::CollectionCheckBoxesInput | |
| def item_wrapper_class | |
| "checkbox-inline" | |
| end | |
| end |
It is possible to compile Go programs for a different OS, even though go build says otherwise.
You'll need:
golang-crosscompile helper script https://github.com/davecheney/golang-crosscompile| package main | |
| import ( | |
| "github.com/codegangsta/martini" | |
| "github.com/codegangsta/martini-contrib/binding" | |
| "github.com/codegangsta/martini-contrib/render" | |
| "labix.org/v2/mgo" | |
| ) | |
| type Wish struct { |
| func (self *Security) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) { | |
| // Browser CORS | |
| // https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS | |
| // http://www.html5rocks.com/en/tutorials/cors/ | |
| origin := r.Header.Get(mjdlib.HttpHeaderKeyOrigin); | |
| // Browser CORS Origin: a Preflight Request (OPTIONS) | |
| if r.Method == "OPTIONS" { | |
| mjdlib.LogInfo("**CORS OPTIONS URL %v: \n request = %v\n", r.RequestURI, r) |
This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).
Running this script should look the same in tmux as without.
curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh