Skip to content

Instantly share code, notes, and snippets.

// https://raw.githubusercontent.com/donnut/typescript-ramda/master/ramda.d.ts
// https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/lodash/lodash.d.ts
declare namespace fp {
interface Dictionary<T> {
[index: string]: T;
}
interface CurriedFunction1<T1, R> {
@alerque
alerque / kinesis-dvp.json
Last active April 21, 2021 23:36
Kinesis Advantage Programmers Dvorak
[{x:0.4,c:"#373737",t:"#ffffff",g:true,f:1,w:0.5,h:0.6},"\n\n\n\n\n\nEsc",{x:0.09999999999999998,w:0.5,h:0.6},"\n\n\n\n\n\nF1",{x:0.10000000000000009,w:0.5,h:0.6},"\n\n\n\n\n\nF2",{x:0.10000000000000009,w:0.5,h:0.6},"\n\n\n\n\n\nF3",{x:0.09999999999999964,w:0.5,h:0.6},"\n\n\n\n\n\nF4",{x:0.10000000000000009,w:0.5,h:0.6},"\n\n\n\n\n\nF5",{x:0.10000000000000009,w:0.5,h:0.6},"\n\n\n\n\n\nF6",{x:0.09999999999999964,w:0.5,h:0.6},"\n\n\n\n\n\nF7",{x:0.10000000000000053,w:0.5,h:0.6},"\n\n\n\n\n\nF8",{x:6.55,w:0.5,h:0.6},"\n\n\n\n\n\nF9",{x:0.09999999999999964,w:0.5,h:0.6},"\n\n\n\n\n\nF10",{x:0.09999999999999964,w:0.5,h:0.6},"\n\n\n\n\n\nF11",{x:0.10000000000000142,w:0.5,h:0.6},"\n\n\n\n\n\nF12",{x:0.09999999999999964,w:0.5,h:0.6},"\n\n\n\n\n\nSys<br>Req",{x:0.09999999999999964,w:0.5,h:0.6},"\n\n\n\n\n\nScrl<br>Lck",{x:0.10000000000000142,w:0.5,h:0.6},"\n\n\n\n\n\nBreak",{x:0.09999999999999787,w:0.5,h:0.6},"\n\n\n\n\n\nKeypad",{x:0.10000000000000142,w:0.5,h:0.6},"\n\n\n\n\n\nProgram"],
[{y:-0.25,x:2.25,f:3},"{\n5","
@donnut
donnut / currying.md
Last active October 28, 2023 17:58
TypeScript and currying

TypeScript and currying

In functional programming you often want to apply a function partly. A simple example is a function add. It would be nice if we could use add like:

var res2 = add(1, 3); // => 4

var add10To = add(10);
var res = add10To(5); // => 15
@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@sindresorhus
sindresorhus / post-merge
Last active May 2, 2024 03:18
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@fxthomas
fxthomas / Advanced-settings.md
Last active August 3, 2016 09:17
SBTEclipse wiki entry about changing project description files

Changing project files

Eclipse .project and .classpath files are XML files, and you can hook into sbteclipse's generation process by using the classpathTransformerFactories and projectTransformerFactories setting keys.

(The following Scala samples should be inside your project's Build.scala file, or a plugin)

Let's say we want to add the com.example.nature nature to our project. The

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 1, 2024 03:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname