Skip to content

Instantly share code, notes, and snippets.

View toddmotto's full-sized avatar

Todd Motto toddmotto

View GitHub Profile
@toddmotto
toddmotto / gist:6183415
Last active December 20, 2015 19:29
SCSS directory structure for web applications
├── mixins/
│ │── _vendor.scss
│ │── _position.scss
│ └── _background-image.scss
├── modules/
│ │── _normalize.scss
│ │── _clearfix.scss
│ │── _variables.scss
│ │── _app.scss
| │── _buttons.scss
conditionizr({
debug : false,
scriptSrc : 'js/conditionizr/',
styleSrc : 'css/conditionizr/',
ieLessThan : {
active: true,
version: '9',
scripts: false,
styles: false,
classes: true,
@toddmotto
toddmotto / gist:5885169
Created June 28, 2013 14:37
Role: Developer / Junior Developer
Description of Role:
Assist with the development of new products and provide consultancy for our customers.
Provide third line development support for our existing customers.
Be part of a dynamic software engineering team consisting of web developers specialising in HTML5/CSS3/Javascript and Server side developers specialising in Java server technologies and Google App Engine.
Mandatory Skills:
Demonstrable experience in at least one of the following: Javascript, Java, Ruby, PHP, Python, C#, C++.
Ability to demonstrate a good understanding of Object Oriented techniques with respect to one of the above programming languages.
Relevant IT or Engineering degree with honours or relevant work experience.
@toddmotto
toddmotto / gist:5800230
Created June 17, 2013 20:47
JavaScript Developer Job-role
Role: Javascript Developer
Responsibilities:
33% of time, develop new Google Appscript applications for our customers.
33% of time, provide 3rd line support for Google Appscript developed applications for our customers. No out of hours requirement.
33% of time, developing web applications in Javascript, HTML5, CSS3 for the creation of products and consultancy.
Mandatory Skills: Javascript (strong knowledge). Google Appscript is a bonus but not necessary. The successful candidate will be trained in the Google Appscript tools and environment.
Important to note that Google Appscript is simply ECMAScript 5 compliant Javascript with a range of Google Apps libraries that runs server side. Think node.js but with Google services.
Desirable Skills: OO Javascript - prototypal inheritance, HTML5, CSS3, JQuery, Chrome Developer Tools, Google Appscript (ScriptDB, UI Service, Google services).
@toddmotto
toddmotto / gist:5595174
Created May 16, 2013 21:17
Three-line SVG detect and HTML class appends
!function(){
function supportsSVG() { return !! document.createElementNS && !! document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect }
if (supportsSVG()) document.documentElement.className += ' svg'
else document.documentElement.className += ' no-svg'
}()
@toddmotto
toddmotto / gist:5481116
Created April 29, 2013 11:46
Remove whitespace from Java includes/tags
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<trim-directive-whitespaces>true</trim-directive-whitespaces>
</jsp-property-group>
</jsp-config>
@toddmotto
toddmotto / gist:4972263
Created February 17, 2013 17:00
Retina media query
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-resolution: 144dpi) {
/* Retina stuff here */
}
@toddmotto
toddmotto / gist:4655457
Created January 28, 2013 13:22
iOS detect
var iOS = navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)/i);
if (!iOS) {
// Run scripts for anything but iOS
}
@toddmotto
toddmotto / gist:4613107
Last active December 11, 2015 14:18
WordPress shortcode for H tags.
// Headings
function heading( $atts )
{
extract(shortcode_atts(array(
'tag' => '',
'text' => '',
), $atts));
return '<h' . $tag . '>' . $text . '</h' . $tag . '>';
}
add_shortcode('heading', 'heading');
@toddmotto
toddmotto / gist:4491950
Created January 9, 2013 09:44
SVG feature detection script, with SVG to PNG fallback and HTML classes
// SVG custom feature detection and svg to png fallback
// toddmotto.com/mastering-svg-use-for-a-retina-web-fallbacks-with-png-script#update
function supportsSVG() {
return !! document.createElementNS && !! document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect;
}
if (supportsSVG()) {
document.documentElement.className += ' svg';
} else {
document.documentElement.className += ' no-svg';
var imgs = document.getElementsByTagName('img'),