Skip to content

Instantly share code, notes, and snippets.

@jlong
jlong / _multi-line-button.scss
Created October 20, 2010 15:45
Sass files converted to SCSS from the article: [Multi-line Buttons with Compass, Sass, and CSS3](http://wiseheartdesign.com/articles/2010/10/19/multi-line-buttons-with-compass-sass-and-css3/)
@mixin multi-line-button($base-color) {
@include background-clip("padding-box");
border-width: 1px;
@include border-radius(6px);
border-style: solid;
color: white;
display: block;
margin: 0.2em auto;
padding: 12px 15px;
text-align: center;
@schisamo
schisamo / definition.rb
Created January 4, 2011 20:50
veewee definition for creating a Vagrant box that mirrors the centos5-gems knife bootstrap template
Veewee::Session.declare( {
:cpu_count => '1',
:memory_size=> '384',
:disk_size => '10140',
:disk_format => 'VDI',
:disk_size => '10240' ,
:os_type_id => 'RedHat',
:iso_file => "CentOS-5.5-i386-netinstall.iso",
:iso_src => "http://mirror.bytemark.co.uk/centos/5.5/isos/i386/CentOS-5.5-i386-netinstall.iso",
:iso_md5 => "0172883a3039772165db073693debae5",
# scenario:
# - you work from a dev account that has git authentication with keys in place
# - you use a sudoer account (first_user) to ssh and run chef on a server
# - the chef recipes deploy an application under a second_user
# - first_user and second_user don't have git keys in place and you want to use forwarding
# initial run (bootstrapping maybe)
include_recipe 'helper'
var HOSTNAME: 'localhost'
, SHARE_SWF: '/client/DeskshareStandalone.swf'
, INSTALL_SWF: '/expressInstall.swf'
, ARCHIVE: "/client/bbb-deskshare-applet-0.71.jar"
, CODE: "org.bigbluebutton.deskshare.client.DeskShareApplet.class"
, SWF_ID: "screen_viewer"
, VIEWER_WIDTH: 800
, VIEWER_HEIGHT: 600
, ROOM_NUMBER: 1;
=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')
def run_in_background(&block)
Process.fork do
Process.fork do
puts "Launching Background Process"
Daemons.call &block
puts "Background Process has been Launched"
end
exit
end
end
@hedgehog
hedgehog / definition.rb
Created May 4, 2011 01:10 — forked from schisamo/definition.rb
veewee definition for creating a Vagrant box that mirrors the ubuntu10.04-gems knife bootstrap template
Veewee::Session.declare( {
:cpu_count => '1',
:memory_size=> '256',
:disk_size => '10140',
:disk_format => 'VDI',
:disk_size => '10240' ,
:os_type_id => 'Ubuntu',
:iso_file => "ubuntu-10.04.1-server-i386.iso",
:iso_src => "http://releases.ubuntu.com/10.04.1/ubuntu-10.04.1-server-i386.iso",
:iso_md5 => "01f72c846845e4e19aec8a45912e5dda",
Vagrant::Config.run do |global_config|
aptdir = (ENV['APTCACHE'] or "#{ENV['HOME']}/aptcache/")
checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/openstack-cookbooks")
ip_prefix = (ENV['IP_PREFIX'] or "192.168.76.")
mac_prefix = (ENV['MAC_PREFIX'] or "080027076")
fixed = (ENV['FIXED'] or "10.0.76.0/24")
global_config.vm.define :chef do |config|
suffix = "100"
ip = "#{ip_prefix}#{suffix}"
config.vm.box = "base"
@nesquena
nesquena / apps.rb
Created May 17, 2011 23:53
Padrino session snippet
# config/apps.rb
Padrino.configure_apps do
enable :sessions
# $ padrino rake gen
# $ rake secret
set :session_secret, "long secret key pasted here"
end