Skip to content

Instantly share code, notes, and snippets.

View SebAshton's full-sized avatar
Eating Cake

Seb Ashton SebAshton

Eating Cake
View GitHub Profile
SebAshton / gist:3423778
Created August 22, 2012 08:34
AppleScript for Vagrant up


  • Launch Automator (Applications > Utilities > Automator)
  • Select Utilities from the Library
  • Drag "Run AppleScript" into workflow
  • Paste and edit the below as appropriate.

###The AppleScript

SebAshton /
Created November 4, 2012 15:49
Open Sublime text project from terminal
# If you haven't already use the command below to add the subl command to terminal
# sudo ln -s "/Applications/Sublime Text" /usr/bin/subl
# more commands here
subl --project ~/path/to/project/name.sublime-project
SebAshton / javascript-hover-bypass.js
Created November 27, 2012 12:02
Gist to bypass all hover events for elements with .hover-bypass on touch devices
* Usage: add class of .hover-bypass to all element with
* hover effects that aren't intended for touch
* users
* Credit: Something wrote
/* Coffee */
(($) ->
SebAshton /
Last active December 12, 2015 01:18
A code snippet the allows you to run specific Cucumber Feature/Scenarios that have been tagged

Add the below command into your pre existing cucumber rake task, within the namespace block. do |t|
    t.cucumber_opts = "--tags #{ ARGV.last }"

All this does is add the --tags option to the executed command line.

usage: rake cucumber:tags @mytag

SebAshton / active_admin_ckeditor_patch.css.scss
Last active November 1, 2017 11:54
CSS to temporarily fix styling of CKeditor in active admin
.active_admin .cke {
display: inline-block;
.active_admin .cke_button_label {
display: none;
padding-left: 3px;
margin-top: 1px;
line-height: 17px;
vertical-align: middle;
SebAshton / gist:4945674
Last active December 13, 2015 17:09
Example of output of active admin inputs inside div blocks
<fieldset class="inputs">
SebAshton / cucumber_redirection_steps.rb
Created June 4, 2013 15:45
Cucumber Steps for HTTP Redirection. Only tested using Capybara's default driver (RackTest)
# Feature: HTTP redirects
# Scenario: 301 redirect
# When I visit the path "<old_path>"
# Then I should get a response with status 301
# And the url path should be "<new_path>"
Then /^I should get a response with status (\d+)$/ do |status|
assert @response.status.should == status
SebAshton / emoji-unicode
Last active December 20, 2015 03:39
Unicode symbols and Emoji to bind icon fonts to
👍 U+1F44D Facebook like
🔎 U+1F50E Search
✉ U+2709 Email
☰ U+2630 Menu
★ U+2605 Rating star
💬 U+1F4AC Comments
⌂ U+2302 Home
🌍 U+1F30D World
📭 U+1F4ED Inbox - Empty
SebAshton /
Last active September 28, 2018 01:09
Available Github Badges
Badge Description Free for OSS Languages
Coveralls Code Coverage Yes Ruby, Python, PHP, Node, C/C++, Java, Scala, Go
Gemnasium Dependancy Monitoring Yes Ruby (RubyGems), Node (NPM)
Crate Num of Downloads ? Python
Brakeman Security Yes RoR
Code Climate Code Review Yes Ruby, Javascript
Version Badge Package Version Yes Ruby, Python, Node
Travis CI Continuous Integration Yes C/C++, Clojure, Erlang, Go, Groovy, Haskell, Java, Jav
SebAshton / gist:7167923
Last active December 26, 2015 14:48
proper numbering of nested ol's
<!doctype html>
<html lang="en">
<title>Nested ol numbering</title>
ol {
list-style-type: none;
counter-reset: level1;
ol li:before {