Skip to content

Instantly share code, notes, and snippets.

@AndrewVos
AndrewVos / group-policy.reg
Created October 25, 2010 11:47
Kills off irritating group policy settings your domain may impose on you.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
; Sets the wallpaper to the default
"Wallpaper"=-
; Allows you to change wallpaper style (center, stretch etc.)
"WallpaperStyle"=-
; Allows you to change the visual style
"SetVisualStyle"=-
; Disables that profile quota message
@AndrewVos
AndrewVos / slug.v
Created April 20, 2022 17:42
Slug generator in vlang
fn generate_slug(name string) string {
mut slug := name
slug = slug.to_lower()
bad := 'àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıİłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;'
good := 'aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------'
for i := 0; i < utf8.len(bad); i++ {
bad_character := utf8.raw_index(bad, i)
good_character := utf8.raw_index(good, i)
@AndrewVos
AndrewVos / heroku-up-to-date.sh
Created March 9, 2021 10:52
Script to notify you when current HEAD is deployed to Heroku
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
echo "Waiting for Heroku release hash to equal HEAD..."
echo "Press [CTRL+C] to stop.."
while :
do
HEROKU_HASH=$(heroku releases | grep Deploy |head -n1 |cut -d ' ' -f4)
/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>
---
- :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 June 7, 2018 17:25
Yarn completion for anything in "scripts". Add it to your .bashrc or whatever. Requires jq
_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 June 5, 2018 17:07
Flash your hue lights on and off
#!/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() {
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",
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",
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",