Skip to content

Instantly share code, notes, and snippets.

View JT5D's full-sized avatar
💭
Multiversing...

JT5D JT5D

💭
Multiversing...
View GitHub Profile
-- This property controls the calendar on which the event is added
set theCalendarName to "AppleScripts"
-- Prompt the user to select a script to attach to an event. This should be an application.
set theScriptToTrigger to choose file with prompt "Please select a saved AppleScript application to attach to an event:" of type "app"
-- Get the script's name
set theScriptToTriggerName to displayed name of (info for theScriptToTrigger)
-- Check for the existence of the target calendar, creating it if it doesn't already exist
-- Set up some initial starting positions and offsets
property theRaceStartingLineTopPosition : 50
property theRaceStartingLineLeftPosition : 100
property theRaceStartingLineBottomOffset : 200
property theRaceFinishLineRightOffset : 200
-- Determine the screen size
tell application "Finder"
set theDesktopBounds to bounds of window of desktop
set theDesktopWidth to item 3 of theDesktopBounds
@JT5D
JT5D / SavWav.cs
Created August 13, 2013 20:11 — forked from darktable/SavWav.cs
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
-- Get the text from Safari
tell application "Safari"
set thePageText to text of document 1
end tell
-- Split the text into paragraphs
set thePars to paragraphs of thePageText
-- Find all paragraphs matching the desired criteria
set theText to ""
@JT5D
JT5D / active.md
Created August 15, 2013 23:42 — forked from paulmillr/active.md

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Sun, 12 Aug 2012 10:35:24 GMT till Mon, 12 Aug 2013 10:35:24 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter((user) -> user.followers > 188)
@JT5D
JT5D / d.py
Created August 16, 2013 00:24 — forked from ameliemaia/d.py
"""
D sculpture
"""
import pymel.core as pm
import random
from pointset import *
sets = 2
points = [ ]
@JT5D
JT5D / d.py
Created August 16, 2013 00:24 — forked from ameliemaia/d.py
"""
D sculpture
"""
import pymel.core as pm
import random
from pointset import *
sets = 2
points = [ ]
/*
Usage: io github <query> [language]
io github django
io github coffeescript
To limit search results to a certain language:
io github django python
To see debug info:
io --debug github django
// js-ajax-parallel-load-pages.js
// Deps: jQuery, underscore, async.js
// Gets HTML from all URLs, parses it, makes DOM query with CSS selector and returns the info.
// urls - urls to get data
// selector - DOM query that will be executed on every url HTML
// itemHandler - function that will be executed on every matched element with selector
//
// Examples:
var getData = function(callback) {
$.getJSON('https://api.twitter.com/1/users/show.json?screen_name=brunch&callback=?').done(function(twitter) {
$.getJSON('https://api.github.com/repos/brunch/brunch').done(function(github) {
callback({github: github.watchers, twitter: twitter.followers_count});
});
});
};
getData();