emacs --daemon
to run in the background.
emacsclient.emacs24 <filename/dirname>
to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
- Undo -
C-/
- Redo -
C-?
- Change case: 1. Camel Case :
M-c
2. Upper Case :M-u
- Lower Case :
M-l
import_if_available(Ecto.Query) | |
# alias MyApp.Repo | |
defmodule R do | |
# Old habits die hard. Take a random of something. You don't care which. | |
# > R.take(SomeSchema) | |
def take(schema_or_query) do | |
schema_or_query | |
|> limit(1) | |
|> Repo.one() |
# Luke's config for the Zoomer Shell | |
# Enable colors and change prompt: | |
autoload -U colors && colors | |
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " | |
# History in cache directory: | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
HISTFILE=~/.cache/zsh/history |
// Processing code by Etienne JACOB | |
// motion blur template by beesandbombs | |
// opensimplexnoise code in another tab might be necessary | |
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e | |
int[][] result; | |
float t, c; | |
float ease(float p) { |
emacs --daemon
to run in the background.
emacsclient.emacs24 <filename/dirname>
to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
C-/
C-?
M-c
2. Upper Case : M-u
M-l
# see the current limits | |
$ sysctl -a | grep maxproc | |
# increase it | |
$ sudo sysctl -w kern.maxproc=xxxx | |
$ sudo sysctl -w kern.maxprocperuid=xxx | |
# run at startup | |
$ sudo vim /etc/sysctl.conf |
#AppStore: Install XCode | |
#install homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew doctor | |
brew update | |
curl https://gist.githubusercontent.com/pyetras/4b59e1902cfaf9af3c98/raw/Caskfile > Caskfile | |
curl https://gist.githubusercontent.com/pyetras/4b59e1902cfaf9af3c98/raw/Brewfile > Brewfile |
import scala.annotation.tailrec | |
object BinarySearch { | |
/** | |
* @param xs Sequence to search | |
* @param key key to find | |
* @param min minimum index (inclusive) | |
* @param max maximum index (inclusive) | |
* @param keyExtract function to apply to elements xs before comparing to key, defaults as identity | |
* @tparam T type of elements in the sequence |
package slicks.docs.dao | |
import scala.slick.driver.PostgresDriver.simple._ | |
import scala.slick.driver._ | |
trait Profile { | |
val profile: JdbcProfile | |
} |
Original text here: https://whydavewhy.com/2013/08/16/loyalty-and-layoffs/ |