start new:
tmux
start new with session name:
tmux new -s myname
# Project Structure | |
facebook/ | |
runserver.py | |
feed/ | |
__init__.py | |
views.py | |
chat/ | |
__init__.py | |
views.py | |
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
########################################## | |
# ofer shaham (c) | |
# 5-2014 | |
# to: towards more generic usage | |
# from: a forked gist | |
########################################## | |
#dd command + pipe the progress using: pv | |
#depend_package: dd pv | |
########################################## | |
set -o nounset |
gdisk /dev/sda # make 1 partition | |
mkfs.vfat -n BOOT /dev/sda1 | |
mkfs.btrfs -L root /dev/sdb | |
mkfs.btrfs -L docker /dev/sdc | |
mount -t btrfs -o noatime,discard,ssd,autodefrag,compress=lzo,space_cache /dev/sdb /mnt/ | |
btrfs subvolume create /mnt/nixos | |
umount /mnt/ | |
mount -t btrfs -o noatime,discard,ssd,autodefrag,compress=lzo,space_cache,subvol=nixos /dev/sdb /mnt/ |
There are now official docs, so follow those as they'll be up-to-date and easier to follow.
Responding to requests via simple route matching is built in to Go's net/http
standard library package. Just register the path prefixes and callbacks you want invoked and then call the ListenAndServe
to have the default request handler invoked on each request. For example:
package main
import (
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
{{ bokeh_css }} | |
{{ bokeh_js }} | |
<link rel="stylesheet" href="stocktext/static/css/styles.css"/> | |
</head> | |
<body> | |
{{ plot_div|indent(8) }} |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
func init() { | |
log.SetFlags(log.Lshortfile) |
#/bin/sh | |
# | |
# Don't change the following lines unless you know what you are doing | |
# They execute the config options starting with 'do_' below | |
grep -E -v -e '^\s*#' -e '^\s*$' <<END | \ | |
sed -e 's/$//' -e 's/^\s*/\/usr\/bin\/raspi-config nonint /' | bash -x - | |
# | |
############# INSTRUCTIONS ########### | |
# | |
# Change following options starting with 'do_' to suit your configuration |