Skip to content

Instantly share code, notes, and snippets.

@laapsaap
laapsaap / windowslinuxstyle.json
Last active April 16, 2018 11:22
Windows/Linux style Karabiner Elements Complex Modifications
{
"title": "Windows/Linux Style",
"rules": [
{
"description": "Option+Tab to Command+Tab",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "tab",
###
### RPM.CONFIG
###
if [ -f "RPM.CONFIG" ]; then
echo
echo ":::::"
echo "::::: Found RPM.CONFIG, downloading files"
echo ":::::"
echo
diff -ru xf86-input-synaptics-1.8.99.1/src/synaptics.c xf86-input-synaptics-1.8.99.1-mod/src/synaptics.c
--- xf86-input-synaptics-1.8.99.1/src/synaptics.c 2015-11-25 07:28:43.000000000 +0100
+++ xf86-input-synaptics-1.8.99.1-mod/src/synaptics.c 2016-06-15 14:54:09.961917509 +0200
@@ -1190,7 +1190,8 @@
{
InputInfoPtr pInfo = dev->public.devicePrivate;
SynapticsPrivate *priv = (SynapticsPrivate *) (pInfo->private);
-
+ int i;
+
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@laapsaap
laapsaap / .tmux.conf
Last active February 5, 2023 20:28
tmux config
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@laapsaap
laapsaap / .Xdefaults
Created February 13, 2017 15:24
xterm config
XTerm*selectToClipboard: true
XTerm*SaveLines: 10000
XTerm*fullscreen: never
XTerm*printerCommand: xterm -T History -e sh -c 'less -r <&3' 3<&0
XTerm*translations: #override Ctrl <Key>slash: print-everything()
*background: rgb:00/00/00
*foreground: rgb:ff/ff/ff
*color0: rgb:00/00/00

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
# Flow control
setw -g c0-change-trigger 10
setw -g c0-change-interval 50
#!/bin/sh
#
# Downloads and installs the startssl CA certs into the global java keystore
# Author: Klaus Reimer <k@ailis.de>
#
# Check if JAVA_HOME is set
if [ "$JAVA_HOME" = "" ]
then
echo "ERROR: JAVA_HOME must be set."
@laapsaap
laapsaap / introrx.md
Last active August 29, 2015 14:13 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.