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
/* -- 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; | |
} |
$(function () { | |
Modernizr.load({ | |
test: Modernizr.json, | |
nope: ['js/vendor/polyfills/json3.js'], | |
callback: function() { alert('fires 2nd'));}, | |
complete: function () { alert('fires 1st')); } | |
}); | |
}); |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'rdiscount' | |
require 'nokogiri' | |
words = 0 | |
limit = 2700 | |
content = $stdin.read | |
html = RDiscount.new(content).to_html |
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) |
/** | |
* @file | |
* Testing a demo of Drupal. The script will log in and check for various | |
* features in Drupal core. This demo was inspired by a similar script for | |
* a Wordpress site. The original script was written by Henrique Vicente. | |
* | |
* @see https://github.com/henvic/phantom-casper-simple-talk/blob/master/wordpress.js | |
*/ | |
// Set up variables to visit a URL and log in. |
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
/** | |
* @file | |
* Testing to see if Picturefill selects the right source at multiple | |
* viewport sizes. | |
*/ | |
// Define the suite of tests and give it the following properties: | |
// - Title, which shows up before any of the pass/fails. | |
// - Number of tests, must be changed as you add tests. | |
// - suite(), which contains all of your tests. |
/** | |
* @file | |
* Using CasperJS to run basic code tests on various libraries. | |
*/ | |
// Define the suite of tests and give it the following properties: | |
// - Title, which shows up before any of the pass/fails. | |
// - Number of tests, must be changed as you add tests. | |
// - suite(), which contains all of your tests. | |
// |
/* | |
* LilyPad tutorial: sensing (sensors) | |
* | |
* Reads data from a LilyPad light sensor module | |
* and then sends that data to the computer | |
* so that you can see the sensor values | |
* | |
* Original: http://web.media.mit.edu/~leah/LilyPad/08_sensors.html | |
*/ |