Skip to content

Instantly share code, notes, and snippets.

View meandavejustice's full-sized avatar

Dave Justice meandavejustice

View GitHub Profile
@meandavejustice
meandavejustice / buttshort.js
Created June 4, 2014 20:40
create butt.ly shortened links
var request = require('request');
var cheerio = require('cheerio');
var prompt = require('prompt');
prompt.start();
prompt.get(['url', 'keyword'], function (err, result) {
request.post('https://butt.ly/index.php', function(err, resp, body) {
var $ = cheerio.load(body);
console.log($('#shorturl').attr('value') + ' now refers to ' + result.url);
}).form({url:result.url, keyword: result.keyword});
#!/bin/bash
# http://scott.sherrillmix.com/blog/programmer/syntax-highlighting-in-terminal/
if [ ! -t 0 ]; then
file=/dev/stdin
elif [ -f $1 ]; then
file=$1
else
echo "Usage: $0 code.js"
echo "or e.g. head code.js|$0"
(imhotep)meandave@Mainframe:~/Code/imhotep$ python imhotep/main.py --repo_name="meandavejustice/extreme-sound-stretch" --github-username="meandavejustice" --github-password="CLASSIFIED" --pr-number=2
No handlers could be found for logger "__main__"
remote: Reusing existing pack: 51, done.
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 61 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (61/61), 36.91 MiB | 761 KiB/s, done.
Resolving deltas: 100% (17/17), done.
"watch-css": "jung -f '\.scss$' -- npm run build-css",
@meandavejustice
meandavejustice / global-modules.txt
Created February 25, 2014 22:16
node-modules I like to have globally installed.
fuck-you
draft-dodger
pdx-shows
tweach
picture-tube
marked-man
n
node-inspector
@meandavejustice
meandavejustice / global-install.sh
Created February 25, 2014 22:14
Reads in a txt file of node-modules you want to globally install and installs them... globally.
#!/usr/bin/env bash
# Trap interrupts and exit instead of continuing the loop
trap "echo Exited!; exit;" SIGINT SIGTERM
while read line; do
npm install -g $line
done < ./global-modules.txt
const PAGEGUIDES = {
'organizer': organizerGuideView,
'activity' : activityGuideView
};
loadViewName: function(viewName, opts) {
return PAGEGUIDES[viewName](opts);
}
import os
import subprocess
from flask import Flask, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename, SharedDataMiddleware
from pydub import AudioSegment
DOWNLOAD_FOLDER = 'downloads/'
UPLOAD_FOLDER = 'uploads/'
ALLOWED_EXTENSIONS = set(['mp3', 'mp4', 'wav', 'ogg', 'flac', 'gif'])
@meandavejustice
meandavejustice / ss.js
Created January 29, 2014 03:46
☠ ☮ ☯ Stupid Snippets ☯ ☮ ☠
/*
___
| | ___________
| | |____ ___|
\ \ | |
\ \ | |
| | | | | |
| | | | | |
|__| |___| |____|