Skip to content

Instantly share code, notes, and snippets.

View stoplion's full-sized avatar
🎯
Focusing

George Norris stoplion

🎯
Focusing
  • Ottertune
  • Elsewhere
View GitHub Profile
//
// Responsive Margin & Padding Shortcuts for Twitter Bootstrap 3.0
// ---------------------------------------------------------------
// This is an addition to Twitter Bootstrap that allows additional margin and padding shortcuts
// for enhanced layout control purposes. It should be included after the bootstrap.less
// import statement or precompiled as you see fit. It differs from bootstrap standards in
// that for any given screen size it predetermines the margin/padding size. All you have to
// do is specify the size you want xs,sm,md,lg, or xl. The exception is for items that you
// want to be centered using auto left/right margins. This can be device responsive by
// specifying mc-xs, mc-sm, mc-md, or mc-lg depending on when you want that behavior.
=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')
@stoplion
stoplion / gist:4e277a004d2d4927bb33
Created September 16, 2015 05:45
Sublime Text Settings
{
"bold_folder_labels": true,
"color_scheme": "Packages/Seti_UI/Scheme/Seti_orig.tmTheme",
"detect_indentation": true,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"folder_exclude_patterns":
[
".svn",
[
{ "keys": ["ctrl+s"], "command": "toggle_side_bar" },
{ "keys": ["ctrl+super+r"], "command": "reveal_in_side_bar"},
{ "keys": ["shift+ctrl+p"], "command": "expand_selection_to_paragraph"},
{ "keys": ["shift+space"], "command": "move", "args": {"by": "characters", "forward": true} }
]
@stoplion
stoplion / gist:1448859
Created December 8, 2011 22:05
Bash script to convert Haml to Slim
#!/bin/bash
file_dir='/Users/geoneo/Sites/orion/app/views'
for i in `find ${file_dir} -maxdepth 3 -type f -name "*.haml" ! -empty`
do
output_dir=`dirname $i`
new_file=`basename ${i} | sed 's/\(.*\.\)haml/\1slim/'`
@stoplion
stoplion / toggle message radio buttons
Created January 5, 2012 14:10
Hide message when any checkbox is checked
$(document).ready ->
$("input[type='checkbox']").change ->
toggle_message()
toggle_message()
toggle_message = ->
if $("input[type='checkbox']").is(":checked")
$("#message").fadeIn()
else
@stoplion
stoplion / gist:1565392
Created January 5, 2012 14:05
Animation for vegas sign (flashing light, background animation toggle)
$(document).ready ->
$('.signup_sign').css('top', '-200px').animate({"top": "-13px"}, 1500)
signup_sign = $('.signup_sign')
light = off
window.setInterval ( ->
if light is off
$(signup_sign).css 'background-position', "-141px 0"
light = on
@stoplion
stoplion / star.haml
Created January 5, 2012 14:11
CSS keyframe animation practice
.oblong_container
%div{:class => "oblong green"}
%div{:class => "oblong blue"}
%div{:class => "oblong purple"}
%div{:class => "oblong pink"}
@stoplion
stoplion / Some Mixins I used on the job board
Created January 5, 2012 14:23
Custom Mixins for Orion
@import "compass"
@import "sassy-buttons"
$experimental-support-for-svg: true
$total-cols: 15
$col-width: 3.5em
$gutter-width: 1em
$side-gutter-width: $gutter-width