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:29 (UTC -04:00)
  • X @lsloan_umich
View GitHub Profile
@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')
@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 / 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)
@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 / 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.
# 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 / 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/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.