:tabnew- new blank tab:tabedit [file]- open file in tab
gt(:tabn) - next tab
| ;; | |
| ;; NS CHEATSHEET | |
| ;; | |
| ;; * :require makes functions available with a namespace prefix | |
| ;; and optionally can refer functions to the current ns. | |
| ;; | |
| ;; * :import refers Java classes to the current namespace. | |
| ;; | |
| ;; * :refer-clojure affects availability of built-in (clojure.core) | |
| ;; functions. |
| function New-Symlink { | |
| <# | |
| .SYNOPSIS | |
| Creates a symbolic link. | |
| #> | |
| param ( | |
| [Parameter(Position=0, Mandatory=$true)] | |
| [string] $Link, | |
| [Parameter(Position=1, Mandatory=$true)] | |
| [string] $Target |
| (defrecord Tree [left elm right]) | |
| (defprotocol Monoid | |
| (append [a b] ) | |
| (identity [a] )) | |
| (defprotocol Foldable | |
| (foldl [l f i]) | |
| (mfirst [l])) | |
| import os | |
| from PIL import Image | |
| ''' | |
| I searched high and low for solutions to the "extract animated GIF frames in Python" | |
| problem, and after much trial and error came up with the following solution based | |
| on several partial examples around the web (mostly Stack Overflow). | |
| There are two pitfalls that aren't often mentioned when dealing with animated GIFs - |
| module Main where | |
| import Control.Monad (replicateM) | |
| import Control.Monad.Trans (lift) | |
| import Control.Monad.Reader (ReaderT, ask, runReaderT) | |
| import Control.Monad.Random (Rand, getRandomR, evalRand) | |
| import System.Random (getStdGen, StdGen) | |
| import Text.Printf | |
| op :: ReaderT Int (Rand StdGen) String |
| $ redis-cli | |
| > config set stop-writes-on-bgsave-error no |
This is not intended to be comprehensive or authoritative, just free online resources I've found valuable while learning more about Erlang.
https://web.archive.org/web/20070429181654/http://www.sics.se/~joe/
Partials are basically functions that return functions with some already predefined arguments and need some arguments to be completed. Let's say you have a function with several arguments to be set, but you don't want to set the majority of arguments over and over again because you need it more than once.
# my useless function to write something to the dom
function writeSomethingToDom(element, content){
element.append(content);
}
# use the function repeatedly
| # Makefile for building keil projects | |
| KEIL=wine "/home/bliker/.wine/drive_c/Keil/UV4/UV4.exe" | |
| TMP=/tmp/keil.out | |
| NULL=/dev/null | |
| # Will prevent it from exiting even when somehing failied | |
| build: | |
| -@$(KEIL) -j0 -b -o $(TMP) *.uvproj 2> $(NULL); | |
| @cat $(TMP) |