Skip to content

Instantly share code, notes, and snippets.

View spencerhakim's full-sized avatar

Spencer Hakim spencerhakim

View GitHub Profile
spencerhakim / disable_slack_wysiwyg.user.js
Last active November 21, 2019 23:07
Disable Slack WYSIWYG userscript
// ==UserScript==
// @name Disable Slack WYSIWYG
// @namespace
// @version 1.0
// @description Disables the WYSIWYG editor in Slack
// @author Spencer Hakim
// @match*
// @grant unsafeWindow
// ==/UserScript==
function __better_git_ps1 {
local GIT_PS1=`__git_ps1 "%s"`
set -f
local GIT_PS1_ARR=($GIT_PS1)
set +f
if [ "$GIT_PS1" ]; then
if [ ${#GIT_PS1_ARR[0]} -ge 20 ]; then
GIT_PS1=`printf "%.20s... %s" \
spencerhakim / Sandman.cs
Last active December 23, 2015 20:49
Sandman - simple program to immediately put my monitors to sleep when I'm going to bed, and keep them off for a certain amount of time. Got tired of simply waiting for my screens to turn off by themselves (since I never actually put my desktop to sleep), only to be randomly woken up by my mouse shifting a pixel due to some sensor noise or someth…
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.