Skip to content

Instantly share code, notes, and snippets.

😕
Why does GitHub have a status?

Dan Jones goodevilgenius

View GitHub Profile
View william_fing_shatner.md

Wil Wheaton's Geek in Review: WILLIAM FUCKING SHATNER

Originally published on Sucide Girls in two parts (1 and 2). Currently accessible via archive.org at Part 1 and Part 2. This version only removed the intro to the Second Part

If you're a longtime reader of my blog, you know that I refer to the first bald captain of the Enterprise as WILLIAM FUCKING SHATNER. The origin of this charming name was first published in my book Dancing Barefoot.

Because my "Star Trek: The Experience" story from Barefoot received such a positive response back in January

@goodevilgenius
goodevilgenius / dl_json.js
Last active Oct 26, 2017
[Download JSON] Force browser to download a JavaScript object as a JSON file, using jQuery, or VanillaJS #webdev #browser #javascript
View dl_json.js
/* global $, data */
// data should be the object/array/etc to be JSON-ified.
// First, with jQuery
var $el = $('<a>');
$(document.body).append($el);
// If data is a jQuery selector, then do data = data.toArray()
@goodevilgenius
goodevilgenius / HangoutsOnAir.md
Last active Oct 26, 2017
[Hangouts On Air: HowTo] Instructions for using Hangouts on Air, as well as downloading the YouTube video (to perhaps use elsewhere) #video #media #tutorial
View HangoutsOnAir.md

First, go to ["My Live Events][1] on YouTube. Creating a new live event, or, if you want to record now, simply "Go Live Now".

Schedule a New Event

Fill in the information for your event, and press "Create Event". Make sure to choose "Unlisted" if you don't want it publicly available. It will still be accessible to anyone with the link.

Create Event

At the schedule time, go back to ["My Live Events"][1], press "Start Hangout on Air"

@goodevilgenius
goodevilgenius / WebLinks.md
Last active Oct 26, 2017
[Web Links] A few sites that I follow that are web/programming related #web
@goodevilgenius
goodevilgenius / notify.sh
Last active Oct 26, 2017
[OS X Command-line Notifier] #mac
View notify.sh
#!/usr/bin/env bash
args=()
while true; do
if [ "$1" = "-title" -o "$1" = "-t" ]; then
shift
args=( "${args[@]}" with title "\"$1\"" )
shift
elif [ "$1" = "-subtitle" -o "$1" = "-st" ]; then
@goodevilgenius
goodevilgenius / my_imgurup.sh
Last active Oct 26, 2017
[imgr upload] upload images to your imgur account from the command line #media #images
View my_imgurup.sh
#!/bin/bash
# To use, create ~/.myimgurup, and put in your client ID and secret
# E.g.:
# CLIENT_ID=80238f8092
# CLIENT_SECRET=239a482b034c820
#
# Next run `base /path/to/my_imgurup.sh auth` to get your PIN and access token
# Finally, `base /path/to/my_imgurup.sh up /path/to/image.png` to upload an image
@goodevilgenius
goodevilgenius / commit-msg.sh
Last active Oct 26, 2017
[git commit message] This git hook can be used to enforce a format for git commits, according to this suggestion on StackExchange: http://programmers.stackexchange.com/a/112710 #development #git
View commit-msg.sh
#!/bin/bash
# This requires the commit summary to start like this:
# [XXX]: message
# * Add
# * Mod(ify)
# * Ref(actor)
# * Fix
# * Rem(ove)
# * Rea(dability)
@goodevilgenius
goodevilgenius / cyanide_happiness.php
Last active Oct 26, 2017
[Explosm feed] A feed generator for Cyanide & Happiness which includes the images #comics
View cyanide_happiness.php
<?php
/**
* Generates a Cyanide & Happiness feed with the images included
* Caches the results to be nice to the server
* Requires memcache and simplehtmldom
* Gist: https://gist.github.com/ec1a3af05246e08be951
*/
// See http://simplehtmldom.sourceforge.net/
@goodevilgenius
goodevilgenius / add_feed.php
Last active Oct 26, 2017 — forked from roborourke/add_feed.php
[Custom Wordpress Feed] #Wordpress
View add_feed.php
<?php
class custom_feed {
public $feed = 'custom-xml';
public function __construct() {
add_action( 'init', array( $this, 'init' ) );
@goodevilgenius
goodevilgenius / cheat_sheet.org.sh
Last active Oct 26, 2017
[Linux cheat sheet] A succinct cheat sheet for newbie linux coders and system administrators, documenting some of the more obscure and useful gems of linux lore. Intended to be viewed in emacs org-mode, or VimOrganizer, though any text editor will suffice. #Linux #Unix #POSIX #cli
View cheat_sheet.org.sh
# cheat_sheet.org.sh
# The contents of this file are released under the GNU General Public License. Feel free to reuse the contents of this work, as long as the resultant works give proper attribution and are made publicly available under the GNU General Public License.
# Best viewed in emacs org-mode.
# Alternately, one can keep this cheat sheet handy by adding the following line to ~/.bashrc:
#
# alias cheatsheet="less ~/path_to_cheat_sheet.org.sh"
#
# Originally by WilliamHackmore: https://github.com/WilliamHackmore/linuxgems
# This version by goodevilgenius: https://gist.github.com/goodevilgenius/2d1c01251c524610a2cd
You can’t perform that action at this time.