Skip to content

Instantly share code, notes, and snippets.

View ChristianPeters's full-sized avatar

Christian Peters ChristianPeters

View GitHub Profile
@JanBe
JanBe / github.com.js
Last active October 25, 2016 16:14
Some improvements for GitHub's pull request view (using https://github.com/defunkt/dotjs)
$(function() {
addProgressBar = function() {
checked = $('.discussion-timeline input:checkbox:checked.task-list-item-checkbox').length
total = $('.discussion-timeline .task-list-item-checkbox').length
progress = (checked / total) * 100.0
bar = '<div class="discussion-sidebar-item progress">'
bar += '<h3 class="discussion-sidebar-heading">Progress</h3>'
bar += '<span class="progress-bar">'
bar += '<span class="progress" style="width: ' + progress + '%">'
bar += '&nbsp;'
@anthonyshort
anthonyshort / _media-queries.scss
Created March 13, 2012 10:37
Media Queries in Sass
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
/* jQuery Radiofy
* ==============
* Turns a select into a hidden text input and
* a set of radio buttons that resemble the options.
* This is used to enable client_side_validations for radio buttons.
* ---
* Daniel Kirsch
* (c) 2012 Zweitag GmbH
*/
(function($){
@netzpirat
netzpirat / 0_README.md
Created November 12, 2010 10:42
Continuous CoffeeScript testing with Guard and Jasmine

Continuous CoffeeScript testing with Guard and Jasmine

This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo

  • Install Gems with Bundler with bundle install
  • Define your guards with mate Guardfile
  • Initialize Jasmine with bundle exec jasmine init
  • Configure Jasmine with mate spec/support/yasmine.ym
  • Start Guard with bundle exec guard