Skip to content

Instantly share code, notes, and snippets.

View KingScooty's full-sized avatar
🚀

Scotty Vernon KingScooty

🚀
View GitHub Profile
@KingScooty
KingScooty / README.md
Last active January 31, 2018 17:00 — forked from chelsea/README.md
Random Aww

Description

Dashing widget to display a random cute picture from http://reddit.com/r/aww

The display of the widget is heavily based on the Image widget, however it does not prepend the src with 'assets' which allows for external images.

Settings

You can set a placeholder image in the event that reddit is down, or otherwise unresponse. This is set at the top of random_aww.rb as follows:

[{"region":"East Midlands","university":"De Montfort University","url":"http://store.apple.com/uk_edu_5000657"},{"region":"East Midlands","university":"Derby University","url":"http://store.apple.com/uk_edu_5000659"},{"region":"East Midlands","university":"Jisc Collections and Janet Limited","url":"http://store.apple.com/uk_edu_5004321"},{"region":"East Midlands","university":"Leicester University","url":"http://store.apple.com/uk_edu_5000710"},{"region":"East Midlands","university":"Lincoln University","url":"http://store.apple.com/uk_edu_5000712"},{"region":"East Midlands","university":"Loughborough College","url":"http://store.apple.com/uk_edu_5000723"},{"region":"East Midlands","university":"Loughborough University","url":"http://store.apple.com/uk_edu_5002639"},{"region":"East Midlands","university":"Nottingham Trent University","url":"http://store.apple.com/uk_edu_5000747"},{"region":"East Midlands","university":"Nottingham University","url":"http://store.apple.com/uk_edu_5000748"},{"region":"East Midla
@KingScooty
KingScooty / Folder Preferences
Created February 27, 2012 15:25 — forked from chrisyour/Folder Preferences
Show hidden files and hidden folders (except .git) in your TextMate project drawer
# Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences.
# Instructions:
# Go to TextMate > Preferences...
# Click Advanced
# Select Folder References
# Replace the following:
# File Pattern
@KingScooty
KingScooty / binary_search.js
Created November 10, 2011 16:59 — forked from martinogden/binary_search.js
Binary Search Algorithm
/**
* @param {list} data List of integers sorted ascending
* @param {int} find Integer to search for
* @param {int} start Min array index
* @param {int} end Max array index
* @return {int} Index of 'find' or -1 if not found
*/
var binarySearch = function (data, find, start, end) {
var mid = start + (end - start) / 2;
@KingScooty
KingScooty / gist:1355278
Created November 10, 2011 16:21 — forked from martinogden/binary_search.js
Binary Search Algorithm
def binarySearch(data, find, start, end):
"""
Search for a integer in a list of integers using a simple `Binary Search` algorithm
:param list data: list of integers sorted ascending
:param int find: integer to search for
:param int start: min array index
:param int end: max array index
:return int: index of 'find' or -1 if not found
"""