This CREATIVE AND TECHNICAL SERVICES AGREEMENT (“Agreement”) is an agreement between Joshua Priddle, (“Developer”) and the party set forth in the Project Estimate (“Customer” or “you” or “your”) incorporated herein by this reference and applies to the purchase of all services ordered by Customer (collectively, the “Services”). The parties understand, acknowledge and agree that this is an online agreement which is being entered into in conjunction with the Services.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Print the list of special characters used with strftime | |
def print_strftime_keys | |
now = Time.parse('2010-06-01') | |
('A'..'Z').to_a.each do |letter| | |
[letter, letter.downcase].each do |l| | |
time = now.strftime("%#{l}") | |
puts "'#{l}' => '#{time}'" | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'uri' | |
def download(url) | |
Thread.new do | |
thread = Thread.current | |
body = thread[:body] = [] | |
url = URI.parse url | |
Net::HTTP.new(url.host, url.port).request_get(url.path) do |response| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
# git browse | |
# Opens origin in web browser | |
# | |
# Ex: | |
# git@myhostname.com:my/repo.git => http://myhostname.com/my/repo | |
# git://myhostname.com/my/repo.git => http://myhostname.com/my/repo | |
# http[s]://myhostname.com/my/repo.git => http://myhostname.com/my/repo | |
browse = !open $( \ | |
echo \"`git config remote.origin.url`\" | \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RATER MODULE for Appcelerator Titanium | |
/* | |
WHAT IS IT: | |
Create a cycling reminder to go rate your app at the App Store. Tracks | |
the app launch count, and reminds the user every 20 launches (configurable) to | |
rate the app, with a click to launch the app page in the App Store. | |
Reminders stop if the user clicks the "Rate Now" or "Don't Remind Me" options. | |
USAGE: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this in app/metals/api.rb | |
require 'sinatra/base' | |
class Api < Sinatra::Base | |
before do | |
content_type :json | |
authenticate if api_request? | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Titanium Mobile Rake tasks | |
# | |
# Validate and launch your Titanium Mobile application via Rake | |
# | |
# Edit Application::COMPILER if not using OS X | |
# Requires jsl (install on OS X via homebrew with `brew install jsl`) | |
# | |
# Only supports iPhone right now. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function generate_password($length = 10) | |
{ | |
$password = ""; | |
$letters = array( | |
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', | |
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', | |
'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', | |
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', | |
'4', '5', '6', '7', '8', '9' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My Old Cell Phone Usage | |
Received Calls: 24:24:39 | |
Dialed Calls: 21:56:11 | |
All Calls: 57:18:20 | |
Transmit Data: 12,033 KB | |
Received Data: 9,743 KB | |
Total: 21,776 KB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Integer | |
def to_minutes | |
min = (self / 60.floor) | |
sec = (self - (min * 60)).round | |
"%0-2d:%0-2d" % [min, sec] | |
end | |
end |