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
/** | |
* Fix for inuit | |
* https://github.com/csswizardry/inuit.css/issues/170#issuecomment-14859371 | |
* https://github.com/sparklemotion/nokogiri.org/blob/master/sass/oscailte/helpers/_grid-fix.scss | |
*/ | |
.layout { | |
letter-spacing: -0.31em; | |
} | |
/* Opera hack */ |
var page = new WebPage(), | |
address, output, size; | |
//capture and captureSelector functions adapted from CasperJS - https://github.com/n1k0/casperjs | |
capture = function(targetFile, clipRect) { | |
var previousClipRect; | |
var clipRect = {top: 0, left:0, width: 40, height: 40}; | |
if (clipRect) { | |
if (!isType(clipRect, "object")) { | |
throw new Error("clipRect must be an Object instance."); |
// npm install serve-static --save-dev | |
var connect = require('connect'); | |
var serveStatic = require('serve-static'); | |
connect().use(serveStatic(__dirname)).listen(8080); |
/** | |
* @license http://opensource.org/licenses/MIT | |
* Polyfill [].forEach.call using the polyfill service | |
* @link https://github.com/Financial-Times/polyfill-service | |
*/ | |
if(false === ('placeholder' in document.createElement('input'))){ | |
var inputs = document.getElementsByTagName('input'); | |
[].forEach.call(inputs, function(input){ | |
if(input.getAttribute('placeholder')){ |
#!/bin/bash | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
#You should do all your LAMP development in a Virtual Machine
##Here's Why:
Many of us develop on Macintoshes. There are many reasons for this, but one of them is that it's based on a Unix platform of some sort. This allows us to run common server software such as Apache, Ruby, Python and Nodejs on our Macs.
Our computers become powerful develoment machines similar to the servers our apps will eventually live on.
Sometime we start our computer only to find Apache won't start, or MySQL can't create a PID file, or we've updated to Mountain Lion and Apache needs to be reconfigured. Death!
/* | |
See it in action: http://jsbin.com/iyinux/edit#javascript,html,live | |
Also Fun: http://jsbin.com/oyanih/7/edit#javascript,html,live | |
Better Fun: http://jsbin.com/uhakaw/34/edit#javascript,html,live | |
*/ | |
/* | |
EXAMPLE USE OF JAVASCRIPT PUBSUB - | |
https://github.com/mroderick/PubSubJS | |
*************************************************************/ |
protected function _initCss(){ | |
require_once APPLICATION_PATH . "/../library/lessphp/lessc.inc.php"; | |
$inputFile = APPLICATION_PATH."/../public/css/less/style.less"; | |
$outputFile = APPLICATION_PATH."/../public/css/style.css"; | |
// load the cache | |
$cacheFile = APPLICATION_PATH . "/../data/cache/css-compiled.less.cache"; |
<!DOCTYPE html> | |
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]--> | |
<!--[if IE 7 ]> <html class="ie7"> <![endif]--> | |
<!--[if IE 8 ]> <html class="ie8"> <![endif]--> | |
<!--[if IE 9 ]> <html class="ie9"> <![endif]--> | |
<!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]--> | |
<head> | |
<!--[if IE]> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> |