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
<!-- 1. Take your Campaign Monitor subscribe form as generated from within your account: --> | |
<form action="http://myaccount.createsend.com/t/r/s/aljhk/" method="post" id="subForm"> | |
<div> | |
<label for="name">Name:</label><br /><input type="text" name="cm-name" id="name" /><br /> | |
<label for="aljhk-aljhk">Email:</label><br /><input type="text" name="cm-aljhk-aljhk" id="aljhk-aljhk" /><br /> | |
<input type="submit" value="Subscribe" /> | |
</div> | |
</form> |
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
# -*- coding: utf-8 -*- | |
$:.unshift("/Library/RubyMotion/lib") | |
require 'motion/project' | |
Motion::Project::App.setup do |app| | |
# Use `rake config' to see complete project settings. | |
app.name = 'HelloMailCore' | |
# Configure MailCore | |
app.vendor_project("vendor/MailCore", :xcode, :headers_dir => "{../include,libetpan/build-mac/.build/include/libetpan}", :target => "MailCore iOS") |
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 'capybara/session' | |
# Provider `assert_page_has_X` helpers for all `has_X?` Capybara matchers | |
# | |
# For a full list, scope: | |
# https://github.com/jnicklas/capybara/blob/master/lib/capybara/session.rb | |
# | |
module CapybaraAssertions | |
Capybara::Session::DSL_METHODS.select { |m| m.to_s.match(/^has/) }.each do |m| | |
define_method "assert_page_#{m.to_s.sub(/\?$/, '')}" do |*args| |
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
# Utility class to help monitor open file descriptors | |
# | |
class FileDescriptorSentry | |
class << self | |
# Return a count of all open file descriptors in the current process. | |
# | |
def count_open_fds | |
ObjectSpace.each_object(IO).count { |o| o.respond_to?(:closed?) && !o.closed? rescue false } | |
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
[alias] | |
begone = "!begone() { git branch -d $1 && git push origin :$1 && git remote prune origin; }; begone" | |
nix = "!nix() { git branch -D $1 && git push origin :$1; git remote prune origin; }; nix" |
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
@mixin respond-to($media) { | |
@if $media == iphone { | |
@media only screen and (device-width: 320px) and (device-height: 480px) { @content; } | |
} | |
@else if $media == iphone-portrait { | |
@media only screen and (device-width: 320px) and (device-height: 480px) and (orientation: portrait) { @content; } | |
} | |
@else if $media == iphone-landscape { | |
@media only screen and (device-width: 320px) and (device-height: 480px) and (orientation: landscape) { @content; } | |
} |
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
// | |
// CoreTextLabel.h | |
// Frost | |
// | |
// Created by David Kasper on 10/1/12. | |
// | |
#import <UIKit/UIKit.h> | |
#import <CoreText/CoreText.h> |
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
(function () { | |
var setupRegularResize, setupIframeResize, e; | |
function bind(a, b) { | |
return function () { | |
return a.apply(b, arguments); | |
}; | |
} | |
setupRegularResize = (function () { |
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
.browser { | |
h3 { | |
margin-bottom: 10px; | |
} | |
ol { | |
@include pie-clearfix; | |
} | |
} |
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
module ControllerFormAttributes | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
def form_params_accessors(type, attributes = []) | |
@form_params_accessors ||= {} | |
@form_params_accessors[type] ||= attributes | |
end |