Skip to content

Instantly share code, notes, and snippets.

View scarpent's full-sized avatar
🙀
Lions and tigers and bears, oh my!

Scott Carpenter scarpent

🙀
Lions and tigers and bears, oh my!
View GitHub Profile
@scarpent
scarpent / waitForKeyElements.js
Last active July 24, 2017 15:16 — forked from BrockA/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.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@scarpent
scarpent / pre-commit
Created March 31, 2017 19:24 — forked from acdha/pre-commit
Git pre-commit hook which runs various code linters. Install this to .git/hooks/pre-commit inside your favorite repos
#!/usr/bin/env PYTHONIOENCODING=utf-8 python
# encoding: utf-8
"""Git pre-commit hook which lints Python, JavaScript, SASS and CSS"""
from __future__ import absolute_import, print_function, unicode_literals
import os
import subprocess
import sys
@scarpent
scarpent / colors.sh
Last active August 29, 2015 14:06 — forked from sumpygump/colors.sh
#!/bin/bash
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#