Skip to content

Instantly share code, notes, and snippets.

View donatj's full-sized avatar
🥽
Getting back to business

Jesse Donat donatj

🥽
Getting back to business
View GitHub Profile
@amitmerchant1990
amitmerchant1990 / stylish.css
Last active March 26, 2021 02:21
Revert back to good old GitHub Homepage
/**
1. Install the Stylish(https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en) extension for Chrome.
2. Open up extension options and paste the CSS mentioned below.
3. Specify the "URLs on the domain" to be `github.com`.
4. Add a title and save.
*/
.dashboard-sidebar {
float: right;
padding-right: 10px;
@donatj
donatj / ColorCLI.php
Created October 26, 2011 03:34
Simple CLI color class
<?php
class ColorCLI {
static $foreground_colors = array(
'bold' => '1', 'dim' => '2',
'black' => '0;30', 'dark_gray' => '1;30',
'blue' => '0;34', 'light_blue' => '1;34',
'green' => '0;32', 'light_green' => '1;32',
'cyan' => '0;36', 'light_cyan' => '1;36',
@mreid
mreid / lz77-encode.py
Last active July 21, 2019 02:59
A simple implementation of the LZ77 algorithm, as described in §13.4 of Cover and Thomas' "Information Theory" book. (Note: python is not my first choice of language so this code is probably non-idiomatic).
# LZ77 Encoding
#
# Simple implementation of Lempel-Ziv 77 (a.k.a. "Sliding Window") coding
# as described in Section 13.4 of Cover & Thomas' "Information Theory".
#
# USAGE: python encode.py INPUT_STREAM
#
# EXAMPLE (from lectures):
# $ python encode.py abbababbababbab
# (0,a)
@oranj
oranj / apache_fetch.php
Created May 15, 2012 19:46
Apache Open Directory Fetch
#!/usr/bin/php
<?php
if (! isset($argv[1])) {
fputs(STDERR, "Please provide a URL to crawl\n");
die(1);
}
if (! isset($argv[2])) {
fputs(STDERR, "Please provide an output filename\n");