Skip to content

Instantly share code, notes, and snippets.

laapsaap

Block or report user

Report or block laapsaap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@laapsaap
laapsaap / windowslinuxstyle.json
Last active Apr 16, 2018
Windows/Linux style Karabiner Elements Complex Modifications
View windowslinuxstyle.json
{
"title": "Windows/Linux Style",
"rules": [
{
"description": "Option+Tab to Command+Tab",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "tab",
View rpmjenkins
###
### RPM.CONFIG
###
if [ -f "RPM.CONFIG" ]; then
echo
echo ":::::"
echo "::::: Found RPM.CONFIG, downloading files"
echo ":::::"
echo
View xf86-input-synaptics-1.8.99.1.xf86PostTouchEvent.patch
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;
+
View i3config
# 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!
View .tmux.conf
# 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
View .Xdefaults
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
View Documentation.md

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
View gist:fbc99e2c6a06c60fc1ee
# 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
View certs_install.sh
#!/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."
View 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.

You can’t perform that action at this time.