This file contains hidden or 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
curl --data "abn=23414472095" http://www.cheapdomains.com.au/register/abracadabra_lookup.php | |
# Response: | |
# {"n":null,"s":null,"type":"single","data":{"name":"LENZ, MATTHEW ","trading_name":"<input type=\"text\" size=\"25\" name=\"trading_name[]\" id=\"trading_name_0\" class=\"\" value=\"Half Design and Development\" \/>","has_trading_name":1,"number":"ABN 23414472095","type":"Sole Trader","domain_name":""}} |
This file contains hidden or 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
.clearfix:before, .clearfix:after { | |
content: ' '; | |
display: table; | |
} | |
.clearfix:after, .wrapper:after { | |
clear: both; | |
} |
This file contains hidden or 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
$.fn.transitionEnd = (callback) -> | |
$(@).one 'transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', callback | |
$.fn.animationEnd = (callback) -> | |
$(@).one 'animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd', callback |
This file contains hidden or 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 'bubble-wrap' | |
class UIImage | |
def self.imageWithColor(color) | |
if color.is_a?(String) | |
color = color.to_color | |
end | |
rect = CGRectMake(0, 0, 1, 1) |
This file contains hidden or 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
doubleTapRecognizer = self.whenTapped do |recognizer| | |
recognizer.numberOfTapsRequired = 2 | |
recognizer.delaysTouchesBegan = true | |
p "Double tap" | |
end | |
singleTapRecognizer = self.whenTapped do |recognizer| | |
recognizer.numberOfTapsRequired = 1 | |
recognizer.delaysTouchesBegan = true |
This file contains hidden or 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 User < ActiveRecord::Base | |
image_accessor :avatar | |
serialize :avatar_geometries, Hash | |
def avatar_dimensions(geometry) | |
unless avatar_geometries.has_key?(geometry) | |
thumb = avatar.thumb(geometry) | |
avatar_geometries[geometry] = { |
This file contains hidden or 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
$('a').on 'click', (event) -> | |
if $(@)[0].host != window.location.host | |
event.preventDefault() | |
window.open($(@).attr('href')) |
This file contains hidden or 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
mutt -e 'set content_type="text/html"' [email protected] -s "HTML Email Test" < message.html |
This file contains hidden or 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
# config/initializers/markdown_handler.rb | |
module MarkdownHandler | |
def self.erb | |
@erb ||= ActionView::Template.registered_template_handler(:erb) | |
end | |
def self.call(template) | |
compiled_source = erb.call(template) | |
"Kramdown::Document.new(begin;#{compiled_source};end, auto_ids: false).to_html" |
This file contains hidden or 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
source :rubygems | |
gem 'rack' |