Skip to content

Instantly share code, notes, and snippets.

View rupl's full-sized avatar
💭
¯\_(ツ)_/¯

Chris Ruppel rupl

💭
¯\_(ツ)_/¯
View GitHub Profile

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@rupl
rupl / gist:6392257
Created August 30, 2013 17:24
reproducing differences between phantomjs/netsniff.js + node yslow versus phantomjs/yslow.js
chris-fk [~/src/pjs] 🌟 phantomjs ../phantomjs/examples/netsniff.js http://fourkitchens.com | yslow --format plain -i basic
size: 513.7K (513750 bytes)
overall score: B (89)
url: http://fourkitchens.com/
# of requests: 23
ruleset: ydefault
page load time: 724
chris-fk [~/src/pjs] 🌟 phantomjs yslow.js -i basic -f plain http://fourkitchens.com
size: 623.2K (623245 bytes)
@rupl
rupl / word_count.rb
Last active December 16, 2015 16:40 — forked from chriseppstein/word_count.rb
Word counter for writing articles. Allows you to count lines of code at a different rate than regular words.
#!/usr/bin/env ruby
require 'rubygems'
require 'rdiscount'
require 'nokogiri'
words = 0
limit = 2700
content = $stdin.read
html = RDiscount.new(content).to_html
@rupl
rupl / gist:5417438
Last active December 16, 2015 10:08
yepnope hackin'
$(function () {
Modernizr.load({
test: Modernizr.json,
nope: ['js/vendor/polyfills/json3.js'],
callback: function() { alert('fires 2nd'));},
complete: function () { alert('fires 1st')); }
});
});
@rupl
rupl / Custom.css
Last active December 14, 2015 15:38
Some styles to make Google apps match @fourkitchens branding
/* -- Gmail -- */
/* mailbox selector thing */
.W0F9rd,
.J-N-Jz {
color: #28701a !important;
}
/* compose button */
.T-I-KE {
background-image: -webkit-gradient(linear,left top,left bottom,from(#4BaD39),to(#48a136)) !important;
}
//
// All lines starting with "//" will not show up in the style.css
// However, the following lines inside "/* ... */" WILL show up.
//
// The visible comment below is there to warn any developer who
// opens a .css file that they need to edit the .scss versions ONLY.
// But you already know that because you're reading this :)
//
/*
// Same as rgba(), in fact, browsers re-map hsla() to rgba() internally,
// except IE9 who retains it as hsla
Modernizr.addTest('hsla', function() {
setCss('background-color:hsla(120,40%,100%,.5)');
return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla');
});
// SASS
.header-main ul.inline li {
& a:hover {
background-color: $dkblue;
}
&.active-trail a {
background-color: $dkblue;
}
}
@rupl
rupl / gist:2507359
Created April 27, 2012 08:16 — forked from webchick/gist:2503918
Only bluecheese errors.
Warning: Illegal offset type in unset in drupal_get_messages() (line 1791 of /var/www/git-dev.drupal.org/htdocs/includes/bootstrap.inc).
Warning: Illegal offset type in isset or empty in drupal_get_messages() (line 1793 of /var/www/git-dev.drupal.org/htdocs/includes/bootstrap.inc).
Notice: Undefined variable: search_box in include() (line 21 of /var/www/git-dev.drupal.org/htdocs/sites/all/themes/bluecheese/tpl/page.tpl.php).
diff --git a/drush/respondjs.drush.inc b/drush/respondjs.drush.inc
index 0226974..1f1b8da 100644
--- a/drush/respondjs.drush.inc
+++ b/drush/respondjs.drush.inc
@@ -6,6 +6,11 @@
*/
/**
+ * The URI to the respond.js library.
+ */