Skip to content

Instantly share code, notes, and snippets.

View waingram's full-sized avatar

William A. Ingram waingram

View GitHub Profile
@waingram
waingram / chrome_mailto_bookmarklet.js
Last active October 16, 2020 19:25
Email link and highlighted text from Chrome bookmarklet
javascript:if(document.getSelection)%7Bs=document.getSelection();%7Delse%7Bs='';%7D;location.href='mailto:?SUBJECT='+encodeURIComponent(document.title)+'&BODY='+encodeURIComponent(location.href)+encodeURIComponent('\u000A\u000A')+encodeURIComponent(s);
@waingram
waingram / gist:00f0d842325cb56d7848fe5947b06224
Created October 3, 2017 18:46 — forked from gsf/gist:1336733
Node.js Summon portal
var crypto = require('crypto');
var http = require('http');
var querystring = require('querystring');
var url = require('url');
var util = require('util');
var accessID = 'xxxxx';
var key = 'xxxxxxxxxx';
var host = 'api.summon.serialssolutions.com';
var summon = http.createClient(80, host);
@waingram
waingram / codemod.sh
Created August 26, 2017 21:35
Run a few useful js-codemods on a file
#!/usr/bin/env bash
# Run a few useful js-codemods on a file
#
# Requires jscodeshift and js-codemod:
# $ npm install -g jscodeshift
# $ git clone https://github.com/cpojer/js-codemod.git
# $ ./codemod.sh <file>
FILE=$1

Keybase proof

I hereby claim:

  • I am waingram on github.
  • I am waingram (https://keybase.io/waingram) on keybase.
  • I have a public key whose fingerprint is A9EE A25C D77F E82D B562 36A4 75F5 8669 8E43 1D1C

To claim this, I am signing this object:

Verifying that +ingram is my blockchain ID. https://onename.com/ingram
@waingram
waingram / stream_test.rb
Created February 25, 2016 16:44
Stream files to DSpace REST bitstream
#!/usr/bin/env ruby
require 'net/http'
require 'excon'
require 'json'
# provide access to the actual socket
class Net::HTTPResponse
attr_reader :socket
end
@waingram
waingram / .inputrc
Created April 29, 2015 15:36
Inputrc
# display a screenful of possible completions at a time
set page-completions on
# ask to view possible completions if >= x
set completion-query-items 200
# complete things that have been typed in the wrong case
set completion-ignore-case on
# list all matches in case multiple possible completions are possible
@waingram
waingram / .bashrc
Created April 29, 2015 15:33
Bash shell options
# =============================================================== #
#
# PERSONAL $HOME/.bashrc FILE for bash-3.0 (or later)
# By Bill Ingram <waingram@gmail.com>
#
# Last modified: Wed Feb 13 10:36:29 CST 2012
# This file is normally read by interactive shells only.
#+ Here is the place to define your aliases, functions and
#+ other interactive features like your prompt.

By Christopher Walken

Do you enjoy eating hot dogs? I hope you won't be put off by my frankness when I tell you that I absolutely love them. In fact, I enjoy no food item more than a freshly-boiled hot dog. Now, I've done a lot of movies, and it's true that I've worked with quite a few celebrities who did not share this opinion. I'm sorry to say that these people have always angered me.

There are two types of people in this world: those who eat hot dogs whenever it is possible to do so, and those who opt to do other things with their free time. Who do the latter think they are kidding? What pastime could be more rewarding than the consumption of hot dogs? I haven't yet found one, and I don't expect to in my lifetime. Unlike other foods, hot dogs can be eaten at any time, in any place, and it is not necessary to cook them. Now, I ask you: Why not eat hot dogs? They are delicious.

I carry a bag of hot dogs with me wherever I go. I eat them from the bag whenever I get the urge, regardless of the circumstances

@waingram
waingram / ListRecords.xml
Last active August 29, 2015 13:57
DSpace-OAI ListRecords
<request set="hdl_2142_5131" metadataPrefix="oai_dc" verb="ListRecords">https://ideals.illinois.edu/dspace-oai/request</request>
<ListRecords>
<record>
<header>
<identifier>oai:www.ideals.illinois.edu:2142/3468</identifier>
<datestamp>2009-09-12T21:13:26Z</datestamp>
<setSpec>hdl_2142_9</setSpec>
<setSpec>hdl_2142_5131</setSpec>
<setSpec>hdl_2142_13736</setSpec>
</header>