Skip to content

Instantly share code, notes, and snippets.

View weechat-slack-irc.conf
/server add <name> <team>.irc.slack.com/6667 -ssl -password=<password>
/set irc.server.<name>.ssl_verify off
/set irc.server.<name>.nicks <username>
/connect <name>
View gist:1389343
---
- :language: Perl
:user_id: sitaramc
:repository: gitolite
- :language: Perl
:user_id: petdance
:repository: ack
- :language: Perl
:user_id: rakudo
:repository: rakudo
@AndrewVos
AndrewVos / yarn-completion.sh
Last active Jun 7, 2018
Yarn completion for anything in "scripts". Add it to your .bashrc or whatever. Requires jq
View yarn-completion.sh
_yarn_complete() {
local cur_word prev_word scripts
cur_word="${COMP_WORDS[COMP_CWORD]}"
prev_word="${COMP_WORDS[COMP_CWORD-1]}"
scripts=$(jq '.scripts | keys[]' package.json | paste)
COMPREPLY=( $(compgen -W "${scripts}" -- ${cur_word}) )
return 0
@AndrewVos
AndrewVos / hue.sh
Created Jun 5, 2018
Flash your hue lights on and off
View hue.sh
#!/usr/bin/env bash
# WARNING: THIS ACTUALLY MADE ME FEEL A BIT SICK. Maybe make the sleeps longer below before you try this out
set -euo pipefail
IFS=$'\n\t'
HUE_IP=$(curl https://www.meethue.com/api/nupnp 2> /dev/null | cut -d '"' -f 8)
function create-hue-user() {
View ec.patch
diff --git a/config.def.h b/config.def.h
index 82b1b09..8d46e57 100644
--- a/config.def.h
+++ b/config.def.h
@@ -84,43 +84,49 @@ unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
- /* 8 normal colors */
- "black",
View forgotten.patch
diff --git a/config.def.h b/config.def.h
index 82b1b09..db3781f 100644
--- a/config.def.h
+++ b/config.def.h
@@ -85,30 +85,28 @@ unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
- "black",
- "red3",
View deep-space.patch
diff --git a/config.def.h b/config.def.h
index 82b1b09..db3781f 100644
--- a/config.def.h
+++ b/config.def.h
@@ -85,30 +85,28 @@ unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
- "black",
- "red3",
@AndrewVos
AndrewVos / plumber.patch
Last active Feb 23, 2018
Plumber for st
View plumber.patch
diff --git a/st.c b/st.c
index ae93ade..ff531a3 100644
--- a/st.c
+++ b/st.c
@@ -218,6 +218,9 @@ char *opt_line = NULL;
char *opt_name = NULL;
char *opt_title = NULL;
int oldbutton = 3; /* button event on startup: 3 = release */
+char *cwd = NULL;
+static char plumber[] = "plumb.sh";
@AndrewVos
AndrewVos / levenshtein.vim
Created May 20, 2017
Levenshtein distance in vim
View levenshtein.vim
function! Levenshtein(first, second)
let f = []
let mn = 0
let fj = 0
let ca = 0
let fj1 = 0
for i in range(len(a:second) + 1)
let f = add(f, i)
endfor
@AndrewVos
AndrewVos / .tmux.conf
Last active Mar 17, 2017
Tmux status that draws a rabbit if your cpu is not in heavy use, or a turtle if it is
View .tmux.conf
set status-right "#(cpu.rb)"
set status-interval 5
You can’t perform that action at this time.