Skip to content

Instantly share code, notes, and snippets.

View toddmotto's full-sized avatar

Todd Motto toddmotto

View GitHub Profile
@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: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: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.
conditionizr({
debug : false,
scriptSrc : 'js/conditionizr/',
styleSrc : 'css/conditionizr/',
ieLessThan : {
active: true,
version: '9',
scripts: false,
styles: false,
classes: true,
@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
@toddmotto
toddmotto / gist:6183631
Created August 8, 2013 10:45
JSON stuff
{
"sites": [
{
"name": "Site number one",
"GA": "UA-XXXXXX"
},
{
"name": "Site number two",
"GA": "UA-XXXXXX"
}
@toddmotto
toddmotto / gist:6183758
Last active December 20, 2015 19:29
JSON
{
"object": {
"key" : "value"
}
"object with Array inside, containing objects": {[
{"key" : "value"},
{"key" : "value"},
{"key" : "value"}
]}
}
@toddmotto
toddmotto / gist:6249144
Created August 16, 2013 11:36
XAMPP svg+xml MIME Type
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/trunk/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/trunk/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@toddmotto
toddmotto / gist:6345979
Created August 26, 2013 20:03
Mobile detects
(function(a) {
if(/android|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(ad|hone|od)|iris|kindle|lge |maemo|meego.+mobile|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|playbook|silk/i.test(a)
||
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt
window.globalData = {};
globalData.alarms = {
totalApplications : '107',
monitoring: [{
"applicationName": "JIRA",
"applicationId": "174-94784",
"dateOfLastFault": "20130828T1103",
"currentFault": "20130828T1327"
},{
"applicationName": "AWS",