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
  • 15:33 (UTC -04:00)
  • X @lsloan_umich
View GitHub Profile
@lsloan
lsloan / ksortRecursive
Last active August 29, 2015 14:20 — forked from cdzombak/README.md
Resursive version of PHP's ksort.
See README.md for details.
@lsloan
lsloan / List GitHub Projects Using jQuery
Last active February 6, 2020 16:06 — forked from tantalor/github.jquery.js
An example JavaScript program using jQuery to get a list of GitHub projects.
Gist title: "List GitHub Projects Using jQuery"
Summary: An example JavaScript program using jQuery to get a list of GitHub projects.
Original source: http://aboutcode.net/2010/11/11/list-github-projects-using-javascript.html
@lsloan
lsloan / InsertDate.gs
Created November 17, 2015 16:46 — forked from thomxc/InsertDate.gs
Google Docs Script Macro: Insert Date
/**
* The onOpen function runs automatically when the Google Docs document is
* opened. Use it to add custom menus to Google Docs that allow the user to run
* custom scripts. For more information, please consult the following two
* resources.
*
* Extending Google Docs developer guide:
* https://developers.google.com/apps-script/guides/docs
*
* Document service reference documentation:
@lsloan
lsloan / markdown_list_codeblock.md
Last active December 15, 2015 15:56 — forked from clintel/gist:1155906
GitHub Markdown lists with embedded code blocks

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
<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.
<a href="http://lemonly.com/work/42-towel-day-infographic" title="42: Life, the Universe and Everything – A Towel Day Infographic by Lemonly">
<img src="http://lemonly.com/wp-content/uploads/2013/05/Towel_Day-42-Infographic-960x2178.jpg"style="max-width: 100%" alt="42: Life, the Universe and Everything – A Towel Day Infographic Design by Lemonly" />
</a>
Learn more about <a href="http://lemonly.com/work/42-towel-day-infographic">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

Here are my attempts to script an IntelliJ-based IDE.

IDE Scripting Console is backed by JSR-223 (javax.script.*) API.

Groovy, Clojure, JavaScript and other scripting languages may be used.

Open IDE Scripting Console, type a statement, hit Ctrl-Enter to execute the current line or selection.

.profile.language-extension file in the same directory will be executed along with it if present.