Skip to content

Instantly share code, notes, and snippets.

View jadeallenx's full-sized avatar

Jade Allen jadeallenx

View GitHub Profile
@glenbot
glenbot / start_package
Created August 19, 2014 18:59
Utility to help bootstrap python packages
#!/bin/bash
# A shell utility to help bootstrap python packages
# Author: Glen Zangirolami
# https://github.com/glenbot
set -o nounset
set -o errexit
# Check for dependencies
function check_dependencies() {
local GIT_INSTALLED=$(which git)
use strict;
use warnings;
{
package JSON::ObjectFactory;
use Carp;
use Class::Tiny { json => sub { 'JSON::PP'->new } };
use Import::Into;
use JSON::PP ();
§2
- don't issue if there is an Auto-Submitted header that <> 'no'
- personal/group responses should be rate limited; default: 7 days
- personal/group responsed only if the responder appears in to/cc/etc
- never respond to <>
- consider not responding to from-daemon addresses
- avoid responding to "extremely malformed" requests
- do not send large responses without authentication
- consider not responding based on headers like Precedence or List-*
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 10, 2025 09:21
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@russelldb
russelldb / gist:7596268
Created November 22, 2013 07:39
riak-erlang-client counter usage
1> {ok, Pid} = riakc_pb_socket:start_link("localhost", 8087).
{ok,<0.35.0>}
2> riakc_pb_socket:set_bucket(Pid, <<"foo">>, [{allow_mult, true}]).
ok
3> riakc_pb_socket:counter_incr(Pid, <<"foo">>, <<"bar">>, 1).
ok
4> riakc_pb_socket:counter_incr(Pid, <<"foo">>, <<"bar">>, 3).
ok
5> riakc_pb_socket:counter_incr(Pid, <<"foo">>, <<"bar">>, -2).
ok
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@gnarf
gnarf / ..git-pr.md
Last active January 27, 2025 01:56
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@glenbot
glenbot / due_dates.py
Last active December 10, 2015 14:08
Due Date Notifier - Notify VIA SMS (SendHub) when a bill is going to be due
#!/usr/bin/env python
# Due Date Notifier - Notify VIA SMS (SendHub) when a bill is going to be due
# * Requires a SendHub account (free) - http://sendhub.com
# * Has python package dependencies: simplejson, requests
# * Recommend putting this on a crob job running once a day
# I like my text messages at at 11am
#
# NOTE: Sendhub free accounts allow only 500 requests to the API per month.
# This should suffice assuming the amount of bills you pay arent loco.
#
@jadeallenx
jadeallenx / ow ith ojo
Created September 11, 2012 19:50 — forked from tempire/ow ith ojo!
tunes.io downloader oneliner
perl -C -S -MTime::Piece -Mojo -E '$i=1; mkdir $dir=$ENV{HOME}."/Dropbox/tunes.io/".localtime->ymd; say $_->text and g($_->attrs("href"))->max_message_size(25600000)->content->asset->move_to("$dir/${\$i++} ${\$_->text}.mp3") for g("tunes.io")->dom("ul a")->each'
@tempire
tempire / ow ith ojo!
Created September 11, 2012 06:01 — forked from jadeallenx/gist:3694498
tunes.io downloader oneliner
perl -MTime::Piece -Mojo -E 'mkdir $dir=$ENV{HOME}."/Dropbox/tunes.io/".localtime->ymd; say $_->text and g($_->attrs("href"))->content->asset->move_to("$dir/${\$_->text}.mp3") for g("tunes.io")->dom("ul a")->each'