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
SebAshton / gist:3423778
Created August 22, 2012 08:34
AppleScript for Vagrant up

#Usage

  • 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
SebAshton / sublime-project-cmd.sh
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 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl
#
# more commands here http://www.sublimetext.com/docs/2/osx_command_line.html
#
subl --project ~/path/to/project/name.sublime-project
@SebAshton
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 https://github.com/chrisblackburn wrote
*/
/* Coffee */
(($) ->
@SebAshton
SebAshton / cucumber:tags.md
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.

Cucumber::Rake::Task.new(:tags) do |t|
    t.cucumber_opts = "--tags #{ ARGV.last }"
end

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

usage: rake cucumber:tags @mytag

@SebAshton
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
SebAshton / gist:4945674
Last active December 13, 2015 17:09
Example of output of active admin inputs inside div blocks
<div>
<fieldset class="inputs">
<legend>
<span>
This
</span>
</legend>
<ol>
<!--...-->
</ol>
@SebAshton
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
end
@SebAshton
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
SebAshton / github-badges.md
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
SebAshton / gist:7167923
Last active December 26, 2015 14:48
proper numbering of nested ol's
<!doctype html>
<html lang="en">
<head>
<title>Nested ol numbering</title>
<style>
ol {
list-style-type: none;
counter-reset: level1;
}
ol li:before {