Skip to content

Instantly share code, notes, and snippets.

View lsloan's full-sized avatar

Mr. Lance E Sloan «UMich» lsloan

  • Teaching and Learning (@tl-its-umich-edu) at University of Michigan: Information and Technology Services
  • Ann Arbor, Michigan, USA
  • 00:11 (UTC -04:00)
  • X @lsloan_umich
View GitHub Profile
<a href="http://lemonly.com/work/celebrating-towel-day-may-25-2012" title="Don't Panic, Use a Towel Day Infographic">
<img src="http://lemonly.com/wp-content/uploads/2012/05/Towel-day-Infographic2.jpg"style="max-width: 100%" alt="Don't Panic, Use a Towel Day Infographic; Design by Lemonly" />
</a>
Learn more about <a href="http://lemonly.com/work/celebrating-towel-day-may-25-2012">Towel Day</a> and <a href="http://lemonly.com">Infographic Design</a> from Lemonly.
@lsloan
lsloan / ordered_json.py
Created June 8, 2016 20:37 — forked from onyxfish/ordered_json.py
Usage of object_pairs_hook to load JSON with guaranteed key order
#!/usr/bin/env python
from collections import OrderedDict
import json
write_data = OrderedDict([
('a', '1'),
('b', '2'),
('c', '3')
])
@lsloan
lsloan / Vim Markdown support.md
Last active June 21, 2016 20:38
My vim environment that does a pretty good job with showing formatting as one edits markdown and keeps my preferred behavior.

An example of configuring Vim to support Markdown.

@lsloan
lsloan / github_whitespace_button.user.js
Last active August 5, 2016 20:04 — forked from xPaw/github_whitespace_button.user.js
Add a button in GitHub UI to ignore whitespace in diffs. To install in a browser with a UserScript extension (e.g., Tampermonkey), click the "Raw" button.
// ==UserScript==
// @name Ignore whitespace button on GitHub
// @description Adds a button in GitHub UI to ignore whitespace changes in commits
// @author lsloan
// @namespace https://gist.github.com/lsloan/e51ac64706b86cc1942616004f2be3bd
// @updateURL https://gist.github.com/lsloan/e51ac64706b86cc1942616004f2be3bd/raw/github_whitespace_button.user.js
// @match https://github.com/*
// @version 1.5
// @run-at document-end
// @grant none
@lsloan
lsloan / submodulewiki.md
Created October 14, 2016 18:04 — forked from iracooke/submodulewiki.md
Wiki as a submodule

From within the parent repo do

        git submodule add git@bitbucket.org:iracooke/transcriptomes.git/wiki wiki
        git commit -m "Adding wiki as submodule"
        git push

Making changes to the wiki and to the parent require separate git commit commands.

@lsloan
lsloan / Minimal JSON-LD required for Graded vocab
Last active December 5, 2016 15:24 — forked from anonymous/README.md
JSON-LD Playground: Minimal JSON-LD required for Graded vocab
See README.md, https://gist.github.com/lsloan/2e43be50000bc13f178cad7fcfca71f0#file-readme-md
@lsloan
lsloan / Markdown and reStructuredText: A Comparison
Last active December 13, 2016 22:26 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText
Gist title: "Markdown and reStructuredText: A Comparison"
Summary: A comparison of formatting features in Markdown and reStructuredText documents. See the " README.md" file for details.
@lsloan
lsloan / Komodo: Run Current File or Selection with PHP
Last active December 14, 2016 15:58 — forked from Naatan/executeAsPHP.js
JavaScript macro for Komodo Edit (or IDE) to run file/selection in PHP interpreter
Gist title: "Komodo: Run Current File or Selection with PHP"
Summary: Save this small JavaScript program to the Toolbox in Komodo Edit (or IDE), assign a key binding to it, and use it to execute the current file (or the selected code if there is any) in a PHP interpreter.
@lsloan
lsloan / README.md
Created February 21, 2017 18:02 — forked from joyrexus/README.md
curl tutorial

An introduction to curl using GitHub's API.

Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin

Includes HTTP-Header information in the output

@lsloan
lsloan / list_vagrant_port_forwardings.rb
Last active March 22, 2017 21:16 — forked from andre1810/list_vagrant_port_forwardings.rb
List Port Forwardings of vagrant machines
vm_infos = `vboxmanage list vms`
puts 'Port Forwardings:'
puts '---------------------------------'
vm_infos.each_line do |vm_info|
vm_name = vm_info.scan(/\"(.*)\"/)
vm_id = vm_info.scan(/.*{(.*)}/).join('')
vm_detail_info = `vboxmanage showvminfo #{vm_id}`