start new:
tmux
start new with session name:
tmux new -s myname
set noswapfile | |
set backupdir=C:\Windows\Temp | |
set guifont=Consolas:h11 | |
set fileencoding=utf-8 | |
map <F5> <esc>:!python %<cr> | |
set guioptions-=L "remove left-hand scroll |
Section "InputClass" | |
Identifier "evdev keyboard catchall" | |
MatchIsKeyboard "on" | |
MatchDevicePath "/dev/input/event*" | |
Driver "evdev" | |
Option "XkbLayout" "br" | |
Option "XkbVariant" "abnt2" | |
EndSection |
<select> | |
<option value="volvo">Volvo</option> | |
<option value="saab">Saab</option> | |
<option value="vw">VW</option> | |
<option value="audi" selected>Audi</option> | |
</select> | |
<a href="#">click!</a> | |
<script> | |
$(function(){ | |
var selectVal = $('select :selected').val(); |
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
set nocompatible " choose no compatibility with legacy vi | |
syntax enable | |
set encoding=utf-8 | |
ffs=unix,dos | |
set showcmd " display incomplete commands | |
filetype plugin indent on " load file type plugins + indentation | |
"" Whitespace | |
set nowrap " don't wrap lines | |
set tabstop=2 shiftwidth=2 " a tab is two spaces |
#!/bin/bash | |
# | |
# Bash script for fast setting up Golang environment | |
# | |
# Usage: | |
# | |
# chmod +x setup-go.sh | |
# | |
# or |
#!/bin/bash | |
# to install: | |
# wget --no-check-certificate http://tiny.cc/yg4zkx -O - | sh | |
cd ~/ | |
install_path="$(pwd)/git" | |
wget https://www.kernel.org/pub/software/scm/git/git-2.1.0.tar.gz | |
tar -xzvf git-2.1.0.tar.gz | |
cd git-2.1.0/ | |
./configure --prefix="$install_path" https://www.kernel.org/pub/software/scm/git/git-2.1.0.tar.gz |
cat /proc/modules | cut -f 1 -d " " | while read module; do \ | |
echo "Module: $module"; \ | |
if [ -d "/sys/module/$module/parameters" ]; then \ | |
ls /sys/module/$module/parameters/ | while read parameter; do \ | |
echo -n "Parameter: $parameter --> "; \ | |
cat /sys/module/$module/parameters/$parameter; \ | |
done; \ | |
fi; \ | |
echo; \ | |
done |
var dgram = require('dgram'); | |
var server = dgram.createSocket("udp4"); | |
// server | |
server.bind(function() { | |
server.setBroadcast(true) | |
server.setMulticastTTL(128); | |
broadcastNew(); | |
}); |