Skip to content

Instantly share code, notes, and snippets.

@akikoo
akikoo / gist:6200960
Last active January 9, 2018 14:51
Automatic Responsive screenshots creation with PhantomJS and CasperJS.
/*!
*
* Automatic Responsive screenshots creation with PhantomJS and CasperJS.
* Adapted from the Responsive Design Workflow book by Stephen Hay (http://responsivedesignworkflow.com/).
*
* Usage instructions:
- Install PhantomJS (http://phantomjs.org/) and CasperJS (http://casperjs.org/)
- Save this script as `screenshots-multipages.js` in a folder somewhere in your filesystem
- In the same folder, create a subfolder called `screenshots` (defined in `screenshotFolder` variable)
- Define the URLs you want to process in `baseUrl` (string) and `links` (array) variables
{
"files":
{
"jquery" : "http://code.jquery.com/jquery.js",
"jquery.min" : "http://code.jquery.com/jquery.min.js",
"jquery-cookie" : "https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js",
"jquery-dotimeout" : "https://raw.github.com/cowboy/jquery-dotimeout/master/jquery.ba-dotimeout.min.js",
"jquery-extra-selectors" : "https://raw.github.com/keithclark/JQuery-Extended-Selectors/master/jquery-extra-selectors.js",
"jquery-flexslider" : "https://raw.github.com/mbmufffin/FlexSlider/master/jquery.flexslider-min.js",
"jquery-mediaelement" : "https://raw.github.com/johndyer/mediaelement/master/build/mediaelement-and-player.js",
@ramseyp
ramseyp / hide-editor.php
Created November 12, 2012 15:48
Hide the content editor for certain pages in WordPress
<?php
/**
* Hide editor on specific pages.
*
*/
add_action( 'admin_init', 'hide_editor' );
function hide_editor() {
// Get the Post ID.