Skip to content

Instantly share code, notes, and snippets.

@the55
the55 / mastercard_atm.rb
Created July 4, 2012 00:27
master card ATM
require 'rubygems'
# require 'akephalos'
require 'capybara'
require 'capybara/dsl'
require 'capybara-webkit'
# require 'pry'
Capybara.run_server = false
Capybara.current_driver = :selenium
// paste this into your browser js debug console
// or run at: http://jsfiddle.net/ervBK/
ᐊ='ᑕ'
ᐅ='ᑐ'
ᐃ='ᑎ'
ᐁ='ᑌ'
ˍ={}
ˉ={'ˍ':eval,'ˉ':'parseInt(Math.random()*9)',
@the55
the55 / raphael.hotdog.js
Created March 24, 2012 14:28
hot dog raphael plugin
// hotdog from Andrew Cameron, from The Noun Project: http://thenounproject.com/noun/hot-dog/#icon-No1820
Raphael.fn.hotDog = function() {
this.setStart();
this.path("M85.889,59.75c1.061,3.918-0.738,8.412-4.068,9.746c-20.641,8.279-42.604,8.535-63.432,0.737 c-3.362-1.257-5.263-5.71-4.292-9.649l0,0c0.971-3.948,4.147-6.031,7.134-4.918c18.851,7.058,38.729,6.827,57.413-0.667 C81.602,53.816,84.824,55.827,85.889,59.75L85.889,59.75z");
this.path("M15.488,44.829c1.426,0.678,1.263,1.892,1.152,2.712c-0.116,0.863,1.747,1.009,2.305,0.786 c1.535-0.615,3.252-1.304,4.73-0.961c1.198,0.278,1.692,1.307,2.178,2.321c0.229,0.475,0.889,1.936,2.905,0.714 c1.323-0.802,2.878-1.567,4.36-1.38c1.347,0.168,2.033,1.251,2.875,2.178c1.421,1.562,2.584,0.732,3.102,0.366 c1.197-0.849,2.53-1.797,4.041-1.735c1.414,0.055,2.417,1.01,3.404,1.948c1.71,1.628,2.197,1.166,3.586-0.03 c1.08-0.929,2.177-1.873,3.634-1.932c1.535-0.063,2.91,0.854,4.143,1.676c2.047,1.366,2.512,0.902,3.619-0.39 c0.848-0.992,1.709-1.999,3.102-2.1
@the55
the55 / mlb_stadium.json
Created March 22, 2012 02:06
Major League Baseball Stadiums with Address and Latitude/Longitude
[{"team":"Anaheim Angels","address":"2000 Gene Autry Way, Anaheim, CA. 92806","lat":33.799572,"lng":-117.889031},{"team":"Arizona Diamondbacks","address":"P.O. Box 2095, Phoenix, AZ. 85001","lat":33.452922,"lng":-112.038669},{"team":"Atlanta Braves","address":"P.O. Box 4064, Atlanta, GA. 30302","lat":33.74691,"lng":-84.391239},{"team":"Baltimore Orioles","address":"333 W. Camden Street, Baltimore, MD. 21201","lat":39.285243,"lng":-76.620103},{"team":"Boston Red Sox","address":"4 Yawkey Way, Boston, MA 02215","lat":42.346613,"lng":-71.098817},{"team":"Chicago Cubs","address":"1060 Addison Street, Chicago, IL 60616","lat":41.947201,"lng":-87.656413},{"team":"Chicago White Sox","address":"333 W. 35th Street, Chicago, IL 60616","lat":41.830883,"lng":-87.635083},{"team":"Cincinnati Reds","address":"100 Cinergy Field, Cincinnati, OH 45202","lat":39.107183,"lng":-84.507713},{"team":"Cleveland Indians","address":"2401 Ontario Street, Cleveland, OH 44115","lat":41.495149,"lng":-81.68709},{"team":"Colorado Rockies","ad
@the55
the55 / flickr: titles
Created February 11, 2012 19:02
Flickr: setting lots of titles and descriptions
//
// if you're using safari, or chrome use the console at (option+cmd+c)
// if you're using firefox, you'll need firebug's console
//
for (var i=0; i < $$('.photo_title input').length; i++) {
$$('.photo_title input')[i].value = 'TITLE';
};
@the55
the55 / somerville_scraper.rb
Created January 29, 2012 20:01
scraper and word analysis tools for the somerville open studios site
#
# info at: http://the55.net/_12/sketch/open_studios
#
# run SomervilleScraper.new.get_artist_ids first. then :get_artist_data. then have fun.
#
URL = 'http://www.somervilleopenstudios.org/artists/artist_list.php?searchType=alpha'
DATA_PATH = File.dirname(__FILE__)
require 'rubygems'
@the55
the55 / sos-statements.txt
Created January 26, 2012 04:06
somerville open studios processed artist statement fragments
a bowl of identity as a commercial
a bowl of me and public art and design
a combination of my paintings and works on paper
a degree in front of the earth
a focus on a journey
a focus on the surface
a sense of me and elegance of identity as an artist 's statement
a type of me and elegance of the art is a background in the past
abstract images that they are inspired by my life and an artist and is a way to photograph
all of the use of science and i am a painter
@the55
the55 / albers-rothko-stella.yaml
Created February 8, 2011 03:28
37 color palettes and variants from painings by albers rothko and stella
---
- :colors_4:
- "#EAABA3"
- "#CE4232"
- "#473332"
- "#C6AB60"
:colors_5:
- "#CE4232"
- "#7A937F"
- "#473332"
@the55
the55 / albers-rothko-stella.json
Created February 8, 2011 03:27
37 colors palettes lifted from paintings by albers rothko stella
[["#7A937F","#473332","#EF271A","#F9A3A2","#F2B94F","#B14647","#F75C17","#C8BEA5"],["#EA7205","#0F3BA7","#0F43B4","#1245C1","#EF9009","#9A6E08","#3C382A","#B68C0D"],["#201B22","#A62521","#5A2325","#C22F2A"],["#231B1D","#C9394F","#593B3E","#F9F7E8","#7B9C57","#D06089","#AD9D5D","#E4AEA2"],["#2D6953","#3C8653","#346B3A","#498F4B","#40853C","#C2A04A","#B96F35","#506C42"],["#2C1622","#422F3A","#3C2445","#FDFBFC","#453249","#5A4F5C"],["#57241E","#AA2D06","#5B2F27","#C33203","#A8431E","#784F4B","#A05640","#A88081"],["#F0C713","#D16E12","#F4D362","#E59C15","#EFBB49","#BE5C11","#F7E193","#F8E6C5"],["#B32018","#F4D7EA","#D25B63","#C8312E","#B35E62","#DDA6AE","#3C241B","#CC8280"],["#F45C67","#2F2E2A","#3D423A","#4E4E46","#B2614B","#A48B85","#473D34","#46463C"],["#9E220D","#46346B","#EACB3D","#652017","#DFAC12","#382A4E","#C15A0A","#A89587"],["#CC0721","#AD1726","#CA5661","#B93F4C","#C8354B","#601512","#CF718F","#DB90A7"],["#713749","#662D34","#A64B31","#794355","#BB5B48","#913C23","#A45A4B","#AD938E"],["#E33407","#1732
@the55
the55 / raphael.arcs.js
Created February 5, 2011 18:26
2 raphael arc objects
// http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands
Raphael.fn.arc = function(startX, startY, endX, endY, radius1, radius2, angle) {
var arcSVG = [radius1, radius2, angle, 0, 1, endX, endY].join(' ');
return this.path('M'+startX+' '+startY + " a " + arcSVG);
};
Raphael.fn.circularArc = function(centerX, centerY, radius, startAngle, endAngle) {
var startX = centerX+radius*Math.cos(startAngle*Math.PI/180);
var startY = centerY+radius*Math.sin(startAngle*Math.PI/180);
var endX = centerX+radius*Math.cos(endAngle*Math.PI/180);