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:08 (UTC -04:00)
  • X @lsloan_umich
View GitHub Profile
@lsloan
lsloan / BetterEnum.php
Last active April 12, 2024 01:02
BetterEnum.php: A pure-PHP alternative to SplEnum, although only a 99% compatible replacement for it.
<?php
/**
* Class BetterEnum
*
* A pure-PHP alternative to SplEnum, although only a 99% compatible replacement for it.
*
* See: http://php.net/manual/en/class.splenum.php
*
* To declare an enum class, subclass BetterEnum and define the names and values as constants.
@lsloan
lsloan / GitHub workflow.gv
Last active February 27, 2018 22:27
Diagram of a common GitHub workflow (short URL: https://goo.gl/79JCB9)
digraph G {
label = "GitHub Workflow\nSource: https://goo.gl/79JCB9"
labelloc = "t"
subgraph cluster_upstream {
label = upstream
style = filled
color = lightgrey
node [style = filled color = white]

This is a list of tips for the Vim editor

@joyrexus
joyrexus / README.md
Last active April 19, 2025 09:46 — forked from btoone/curl.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

@jiahao
jiahao / githubworkflow.svg
Last active September 2, 2019 02:15
Julia developers' basic Github workflow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xPaw
xPaw / github_whitespace_button.user.js
Last active May 10, 2019 21:31
Adds a button in GitHub UI to ignore whitespace changes in commits
// ==UserScript==
// @name Ignore whitespace button on GitHub
// @description Adds a button in GitHub UI to ignore whitespace changes in commits
// @author xPaw
// @namespace https://gist.github.com/xPaw/de6ee132a2e267ef6960
// @updateURL https://gist.github.com/xPaw/de6ee132a2e267ef6960/raw/github_whitespace_button.user.js
// @match https://github.com/*
// @version 1.6.1
// @run-at document-end
// @grant none
@iracooke
iracooke / submodulewiki.md
Last active July 23, 2021 00:45
Wiki as a submodule

From within the parent repo do

        git submodule add [email protected]: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.

@gregsh
gregsh / - IDE Scripting.md
Last active April 18, 2025 16:06
IDE Scripting

Here are my attempts to script an IntelliJ-based IDE using javax.script.* API (ex-JSR-223).

The list of available scripting languages and engines:

  1. Groovy - built-in, via Groovy jars and <app>/lib/groovy-jsr223-xxx.jar
  2. JavaScript (Nashorn) - built-in, via Java Runtime <app>/jbr/... (deprecated and will be removed soon)
  3. JavaScript (GraalJS) - https://plugins.jetbrains.com/plugin/12548-intellij-scripting-javascript
  4. JPython - https://plugins.jetbrains.com/plugin/12471-intellij-scripting-python
  5. JRuby - https://plugins.jetbrains.com/plugin/12549-intellij-scripting-ruby
  6. Clojure - https://plugins.jetbrains.com/plugin/12469-intellij-scripting-clojure
@phocks
phocks / following-list-sorted.lst
Last active April 1, 2016 13:15
Brisbane Twitter Usernames
#list of people tweeting in brisbane
0092991
009Rae
0114kyohei
01D7oom
036cd686bc1a4dc
0402595022a
0411makikkuma
0509yy
0516pikari
@scottstamp
scottstamp / docvalidate.py
Last active June 9, 2016 14:35
Utility for checking anchor links for the Docker documentation
""" I honestly don't even know how the hell this works, just use it. """
__author__ = "Scott Stamp <[email protected]>"
from HTMLParser import HTMLParser
from urlparse import urljoin
from sys import setrecursionlimit
import re
import requests
setrecursionlimit(10000)