diff options
| -rw-r--r-- | clojure-macros.html.markdown | 2 | ||||
| -rw-r--r-- | common-lisp.html.markdown | 8 | ||||
| -rw-r--r-- | go.html.markdown | 14 | ||||
| -rw-r--r-- | python.html.markdown | 2 | ||||
| -rw-r--r-- | python3.html.markdown | 2 | ||||
| -rw-r--r-- | tmux.html.markdown | 32 | ||||
| -rw-r--r-- | typescript.html.markdown | 2 | 
7 files changed, 43 insertions, 19 deletions
| diff --git a/clojure-macros.html.markdown b/clojure-macros.html.markdown index 8e671936..9e907a7f 100644 --- a/clojure-macros.html.markdown +++ b/clojure-macros.html.markdown @@ -109,7 +109,7 @@ You'll want to be familiar with Clojure. Make sure you understand everything in  (list x) ; -> (4)  ;; It's typical to use helper functions with macros. Let's create a few to -;; help us support a (dumb) inline arithmatic syntax +;; help us support a (dumb) inline arithmetic syntax  (declare inline-2-helper)  (defn clean-arg [arg]    (if (seq? arg) diff --git a/common-lisp.html.markdown b/common-lisp.html.markdown index c4ecb5e8..f9f64d68 100644 --- a/common-lisp.html.markdown +++ b/common-lisp.html.markdown @@ -573,13 +573,15 @@ nil                  ; for false - and the empty list      "While `condition` is true, `body` is executed.  `condition` is tested prior to each execution of `body`" -    (let ((block-name (gensym))) +    (let ((block-name (gensym)) (done (gensym)))          `(tagbody +           ,block-name             (unless ,condition -               (go ,block-name)) +               (go ,done))             (progn             ,@body) -           ,block-name))) +           (go ,block-name) +           ,done)))  ;; Let's look at the high-level version of this: diff --git a/go.html.markdown b/go.html.markdown index 17f10bd9..34b855e3 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -64,7 +64,11 @@ func beyondHello() {  	learnTypes()                            // < y minutes, learn more!  } -// Functions can have parameters and (multiple!) return values. +/* <- multiline comment +Functions can have parameters and (multiple!) return values. +Here `x`, `y` are the arguments and `sum`, `prod` is the signature (what's returned). +Note that `x` and `sum` receive the type `int`. +*/  func learnMultiple(x, y int) (sum, prod int) {  	return x + y, x * y // Return two values.  } @@ -83,7 +87,7 @@ can include line breaks.` // Same string type.  	f := 3.14195 // float64, an IEEE-754 64-bit floating point number.  	c := 3 + 4i  // complex128, represented internally with two float64's. -	// Var syntax with an initializers. +	// var syntax with initializers.  	var u uint = 7 // Unsigned, but implementation dependent size as with int.  	var pi float32 = 22. / 7 @@ -177,8 +181,14 @@ func learnFlowControl() {  	case 1:  	case 42:  		// Cases don't "fall through". +		/* +		There is a `fallthrough` keyword however, see: +		  https://github.com/golang/go/wiki/Switch#fall-through +		*/  	case 43:  		// Unreached. +	default: +		// Default case is optional.  	}  	// Like if, for doesn't use parens either.  	// Variables declared in for and if are local to their scope. diff --git a/python.html.markdown b/python.html.markdown index 478804cd..63547bf6 100644 --- a/python.html.markdown +++ b/python.html.markdown @@ -101,6 +101,8 @@ not False  # => True  # Strings can be added too!  "Hello " + "world!"  # => "Hello world!" +# Strings can be added without using '+' +"Hello " "world!"  # => "Hello world!"  # ... or multiplied  "Hello" * 3  # => "HelloHelloHello" diff --git a/python3.html.markdown b/python3.html.markdown index 56126ad3..6c5e1059 100644 --- a/python3.html.markdown +++ b/python3.html.markdown @@ -101,6 +101,8 @@ False or True #=> True  # Strings can be added too! But try not to do this.  "Hello " + "world!"  # => "Hello world!" +# Strings can be added without using '+' +"Hello " "world!"  # => "Hello world!"  # A string can be treated like a list of characters  "This is a string"[0]  # => 'T' diff --git a/tmux.html.markdown b/tmux.html.markdown index 2ccb067a..c11da5fc 100644 --- a/tmux.html.markdown +++ b/tmux.html.markdown @@ -7,8 +7,8 @@ filename: LearnTmux.txt  --- -<a href="http://tmux.sourceforge.net/"> -tmux</a> is a terminal multiplexer: it enables a number of terminals +[tmux](http://tmux.sourceforge.net) +is a terminal multiplexer: it enables a number of terminals  to be created, accessed, and controlled from a single screen. tmux  may be detached from a screen and continue running in the background  then later reattached. @@ -50,13 +50,15 @@ then later reattached.       -a              # Kill all sessions       -a -t "#"       # Kill all sessions but the target +``` -## Key Bindings +### Key Bindings -#   The method of controlling an attached tmux session is via key -# combinations called 'Prefix' keys. +The method of controlling an attached tmux session is via key +combinations called 'Prefix' keys. +```  ----------------------------------------------------------------------    (C-b) = Ctrl + b    # 'Prefix' combination required to use keybinds @@ -109,10 +111,9 @@ then later reattached.  ### Configuring ~/.tmux.conf -  tmux.conf can be used to set options automatically on start up, much +tmux.conf can be used to set options automatically on start up, much  like how .vimrc or init.el are used. -  ```  # Example tmux.conf  # 2014.10 @@ -236,8 +237,15 @@ set -g status-right "#[fg=green] | #[fg=white]#(tmux-mem-cpu-load)#[fg=green] |  ``` -<a href="http://tmux.sourceforge.net/">Tmux | Home</a><br> -<a href="http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/tmux.1?query=tmux">Tmux Manual page</a><br> -<a href="http://wiki.gentoo.org/wiki/Tmux">Gentoo Wiki</a><br> -<a href="https://wiki.archlinux.org/index.php/Tmux">Archlinux Wiki</a><br> -<a href="https://stackoverflow.com/questions/11558907/is-there-a-better-way-to-display-cpu-usage-in-tmux">Display CPU/MEM % in statusbar</a><br> + +### References + +[Tmux | Home](http://tmux.sourceforge.net) + +[Tmux Manual page](http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/tmux.1?query=tmux) + +[Gentoo Wiki](http://wiki.gentoo.org/wiki/Tmux) + +[Archlinux Wiki](https://wiki.archlinux.org/index.php/Tmux) + +[Display CPU/MEM % in statusbar](https://stackoverflow.com/questions/11558907/is-there-a-better-way-to-display-cpu-usage-in-tmux) diff --git a/typescript.html.markdown b/typescript.html.markdown index 27a1f71a..e9135510 100644 --- a/typescript.html.markdown +++ b/typescript.html.markdown @@ -9,7 +9,7 @@ TypeScript is a language that aims at easing development of large scale applicat  TypeScript adds common concepts such as classes, modules, interfaces, generics and (optional) static typing to JavaScript.  It is a superset of JavaScript: all JavaScript code is valid TypeScript code so it can be added seamlessly to any project. The TypeScript compiler emits JavaScript. -This article will focus only on TypeScript extra syntax, as oposed to [JavaScript] (../javascript/). +This article will focus only on TypeScript extra syntax, as opposed to [JavaScript] (../javascript/).  To test TypeScript's compiler, head to the [Playground] (http://www.typescriptlang.org/Playground) where you will be able to type code, have auto completion and directly see the emitted JavaScript. | 
