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
  • 22:06 (UTC -04:00)
  • X @lsloan_umich
View GitHub Profile
@lsloan
lsloan / Open Selected Finder Folder in iTerm
Last active September 13, 2017 06:10 — forked from al3xandru/gist:1156476
Use the selected folder in Finder to open a shell in iTerm and go to its directory.
Gist title: "Open Selected Finder Folder in iTerm"
Summary: Use the selected folder in Finder to open a shell in iTerm and go to its directory.
See also: https://gitlab.com/gnachman/iterm2/issues/3552
@lsloan
lsloan / dart.txt
Last active September 27, 2015 13:18 — forked from paulmillr/dart.md
Leaked internal Google Dart email
---------- Forwarded message ----------
From: Mark S. Miller <erights@google.com>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: javascript-standard@google.com
On November 10th and 11th, a number of Google teams representing a variety
of viewpoints on client-side languages met to agree on a common vision for
the future of Javascript.
@lsloan
lsloan / Convert video subtitles from YouTube XML format to SubRip (.srt)
Last active June 17, 2018 12:31
A Ruby program to convert video subtitles from YouTube's XML format to the SubRip format.
Gist title: "Convert video subtitles from YouTube XML format to SubRip (.srt)"
Summary: A Ruby program to convert video subtitles from YouTube's XML format to the SubRip format.
@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 / Sound Demo.py
Last active August 29, 2015 14:16 — forked from omz/Sound Demo.py
# Simple demo of playing a looping sound using the (currently undocumented) sound.Player class
import sound
import os
from scene import *
class MyScene (Scene):
def setup(self):
self.player = sound.Player(os.path.expanduser('~/Pythonista.app/Beep.caf'))
self.player.number_of_loops = -1 #repeat forever
@lsloan
lsloan / sounder.py
Last active August 29, 2015 14:16 — forked from cclauss/sounder.py
Play each .caf sound inside of Pythonista.app
# sounder.py
# play each of the .caf sounds inside the Pythonista.app
import os, os.path, scene, sound
framesPerSound = 60
pythonistaDir = os.path.expanduser('~/Pythonista.app')
soundFileExtension = '.caf'
wallpaperAppIcon = ('/AppIcon76x76@2x~ipad.png', '/AppIcon60x60@2x.png')
# Very simple class just to represent some business logic implementation
# which has nothing to do with the UI or any caller that uses this class.
class HelloWorldImpl():
def __init__(self):
pass
def sayHelloWorld(self):
print 'Hello World from Sheldon Wosnick'
def sayGoodbyeWorld(self):
@lsloan
lsloan / pipista.py
Last active August 29, 2015 14:18 — forked from pudquick/pipista.py
'''pipista.py'''
import os, os.path, sys, urllib2, requests
class PyPiError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
See the entry point in file "blti-launch.html".