bug - Code changes linked to a known issue.
clean - Cleans up whitespace, organization, re/de-factoring.
dev - Experiments (will not be merged without a rename). Doesn't need a status.
feat - New feature.
hotfix - Quick fixes to the codebase.
perf - Performace enhancements.
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names | |
# *) local and remote tag names |
TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl
extension and a different #!
call.
The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect
we use the following:
#!/usr/bin/expect
Start with LinuxCommand.org.
A good cheatsheet will go a long way. Google is your friend. One great option is "Linux Gems", try going through and learning about each one.
If you know DOS at all, Linux for DOS users might help. (It also works in reverse if you know Linux and you're trying to survive on Windows.)
When you don't know what a command means, a nifty little utility called Explain Shell can help, and from there you can read the man
or info
pages to glean more.
<?php | |
function luhn2($number) { | |
static $sum_table = [[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]]; | |
$sum = 0; | |
$number = (string)$number; | |
$i = strlen($number); | |
while (--$i) { | |
$sum += $sum_table[($i+1) % 2][$number[$i]]; |
current db: db | |
list dbs: show dbs | |
change db: use DB_NAME | |
insert: db.COLLECTION_NAME.insert( j ) | |
collections: show collections |
<style> | |
* { | |
margin: 0; | |
border-radius: 2px; | |
} | |
body { | |
margin: 3%; | |
background: #eee; | |
} | |
column { |
process.stdout.write() // Write to console |
# Types |
123 - Numbers | |
1.2 - Float | |
2#110 - Binary 6 | |
{,} - Tuples | |
[,] - Lists (also "strings") | |
"ab" - A shortcut for [97,98] | |
atom - An atom | |
'atom' | |
Var = 1. - Setting a variable (constant). |