Skip to content

Instantly share code, notes, and snippets.

@reecer
reecer / waitForKeyElements.js
Created October 18, 2023 18:34 — forked from mjblay/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content. Forked for use without JQuery.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
//--- Page-specific function to do what we want when the node is found.
function commentCallbackFunction (element) {
element.text ("This comment changed by waitForKeyElements().");
@reecer
reecer / .zshrc
Created August 15, 2023 19:42 — forked from Anon-Exploiter/.zshrc
.zshrc of Kali Linux 2020.3 including the lit prompt
# ~/.zshrc file for zsh non-login shells.
# see /usr/share/doc/zsh/examples/zshrc for examples
setopt autocd # change directory just by typing its name
#setopt correct # auto correct mistakes
setopt interactivecomments # allow comments in interactive mode
setopt ksharrays # arrays start at 0
setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’
setopt nonomatch # hide error message if there is no match for the pattern
setopt notify # report the status of background jobs immediately
@reecer
reecer / sp
Created December 27, 2017 00:41 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@reecer
reecer / update-vscode.sh
Created February 5, 2017 21:00
Update vs-code via latest 64-bit tar.gz
#!/usr/bin/env bash
OUT_DIR=/opt/
URL='https://vscode-update.azurewebsites.net/latest/linux-x64/stable'
DIR="$(dirname "$(readlink -f "$0")")"
TAR_FILE=$DIR/latest.tar.gz
curl -z $TAR_FILE -o $TAR_FILE -L $URL
tar xzf $TAR_FILE -C $OUT_DIR
@reecer
reecer / System Design.md
Created April 19, 2016 18:00 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@reecer
reecer / gist:f22eb4c1381dddb831d0
Created February 14, 2015 01:56
Gnome dual monitor workspaces
gsettings set org.gnome.shell.overrides workspaces-only-on-primary false
@reecer
reecer / *.jsx
Created February 10, 2015 03:13
React.js getDOMNode 0.13 change
...
componentDidMount(){
// this.getDOMNode().className += '...';
React.findDOMNode(this).className += '...';
}
...
@reecer
reecer / .tmux.conf
Last active August 29, 2015 14:14 — forked from paulrouget/.tmux.conf
set -g default-terminal "screen-256color"
set -g status-utf8 on
bind M source-file ~/.tmux/mac.session
bind L source-file ~/.tmux/linux.session
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# THEME
set -g status-bg black

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname