Skip to content

Instantly share code, notes, and snippets.

#! /bin/sh
### Must have Gcloud sdk installed and configured
###Create a micro instance as ansible master
gcloud compute --project "civil-topic-622" instances create "ansible" --zone "us-central1-b" --machine-type "f1-micro" --network "default" --maintenance-policy "MIGRATE" --scopes "https://www.googleapis.com/auth/userinfo.email" "https://www.googleapis.com/auth/compute" "https://www.googleapis.com/auth/devstorage.full_control" --tags "http-server" "https-server" --no-boot-disk-auto-delete
###or a centos like in the tutorial
gcloud compute --project "civil-topic-622" instances create "ansible-master" --zone "us-central1-b" --machine-type "g1-small" --network "default" --maintenance-policy "MIGRATE" --scopes "https://www.googleapis.com/auth/userinfo.email" "https://www.googleapis.com/auth/compute" "https://www.googleapis.com/auth/devstorage.full_control" --tags "http-server" "https-server" --image "https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/centos-7-v20140926" --no-boot-disk
@tmbdev
tmbdev / webcam.sh
Created December 29, 2014 05:27
simple webcam server in Shell
#!/bin/bash
port=8899
send_header() {
cat <<EOF
HTTP/1.0 200 OK
Content-Type: image/jpeg
Refresh: 10
Connection: Close
# A tmux configuration file with some smallish modifications that make it work better
# for Emacs users. Main difference is that the escape key is C-\ instead of C-b
set-option -g prefix 'C-\'
unbind C-b
unbind r
bind r source-file ~/.tmux.conf
set-option -g mouse-select-pane on
set-option -g mode-mouse off
set-option -g mode-keys emacs
unbind 'C-\'
@tmbdev
tmbdev / gist:aa444af92091b9f9211f
Created July 29, 2015 23:45
installing latexsuite on Ubuntu
sudo apt-get install vim-latexsuite
vim-addons install latex-suite
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
import openfst
from scipy.ndimage import measurements,filters
from collections import defaultdict
from pylab import *
import unicodedata
! we use the Caps_Lock and Return keys for both space and carriage return
! unshifted is space, shifted is carriage return (fortunately, neither has
! a shifted meaning on a normal keyboard)
! space bar
keycode 65 = Mode_switch
! caps lock key
keycode 66 = space space Return Return
! Return key

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.

Language as Fixed Point
... test ...