Skip to content

Instantly share code, notes, and snippets.

=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@first-developer
first-developer / vim7.3_mac_install.rb
Created August 6, 2012 13:41 — forked from sirupsen/vim7.3_mac_install.rb
Script to install Vim 7.3 with ruby support for Mac OS X Lion
# requires root permissions in /usr/bin/
star = String.new
8.times { star += "*" }
Star = "\n#{star * 3}\n"
def newblock string
puts "\n#{Star}#{string}#{Star}\n"
end
@first-developer
first-developer / data-markdown.user.js
Created November 21, 2012 10:54 — forked from paulirish/data-markdown.user.js
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@first-developer
first-developer / LicensesActivity.java
Created November 21, 2012 13:51 — forked from cyrilmottier/LicensesActivity.java
"Open source licenses" screen
package com.cyrilmottier.android.citybikes;
import android.os.Bundle;
import com.cyrilmottier.android.avelov.R;
import com.cyrilmottier.android.citybikes.app.BaseActivity;
public class LicensesActivity extends BaseActivity {
private WebView mWebView;
@first-developer
first-developer / Gemfile
Created December 3, 2012 03:59 — forked from Arwid/Gemfile
Sprockets compilation of assets
source 'http://rubygems.org'
gem 'sass'
gem 'coffee-script'
gem 'yui-compressor'
gem 'handlebars_assets'
gem 'sprockets'
gem 'rb-fsevent'
public class MainActivity extends FragmentActivity {
/**
* The {@link android.support.v4.view.PagerAdapter} that will provide fragments for each of the sections. We use a
* {@link android.support.v4.app.FragmentPagerAdapter} derivative, which will keep every loaded fragment in memory.
* If this becomes too memory intensive, it may be best to switch to a
* {@link android.support.v4.app.FragmentStatePagerAdapter}.
*/
SectionsPagerAdapter mSectionsPagerAdapter;
/***
* Copyright (c) 2012 readyState Software Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Template Components

Used to provide structural templates.

Pattern

t-template-name
t-template-name--modifier-name
t-template-name__subcomponent-name--subcomponent-modifier-name
requirejs.config({
shim: {
'foundation/jquery.foundation.topbar': {
deps: ['jquery'],
},
'foundation/jquery.cookie': {
deps: ['jquery']
},
'foundation/jquery.event.move': {
deps: ['jquery']
public abstract class NumberPickerWrapper {
static public NumberPickerWrapper createHolder(View view) {
NumberPickerWrapper numberPickerWrapper;
numberPickerWrapper = Build.VERSION.SDK_INT > 10 ? new NumberPickerWrapper_Sdk14()
: new NumberPickerWrapper_Sdk10();
numberPickerWrapper.setView(view);
return numberPickerWrapper;
}