- Make accessibility part of it
- Iterate, iterate, iterate!
- Refer to WCAG and the ARIA Authoring Practices
- Awareness
- Design and UX
| const isIE = () => { | |
| const style = document.documentElement.style; | |
| return (('msScrollLimit' in style || 'behavior' in style) && !('webkitFlex' in style)); | |
| }; |
| window.console.loge = function (msg) { | |
| var gifs = ['wink','shake-space','peepers','prizza','hat','gradient','fat','rainbow','sunglasses','derp','shake'], | |
| wow = ['', 'wow! ', 'amaze! ', 'dazzle! '], | |
| adjs = ['so', 'such', 'many', 'much', 'very'], | |
| randomizr = function (a) { return a[Math.floor(Math.random() * a.length)];}, | |
| message = '%c ' + randomizr(wow) + randomizr(adjs) + ' ' + typeof msg + ': ', | |
| css = 'background: url(http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-' + randomizr(gifs) + '-212.gif) no-repeat 0 0; background-size: 80px 80px; font-family: \'Comic Sans MS\', cursive; text-shadow: 0 1px 1px rgba(0,0,0,1); font-size: 14px; padding: 25px; line-height: 70px; color: #fff; font-weight: 100;'; | |
| console.log.apply(console, typeof msg === 'object' ? [message, css, msg] : [message += msg, css]); | |
| }; |
| function getGreetingTime (m) { | |
| var g = null; //return g | |
| if(!m || !m.isValid()) { return; } //if we can't find a valid or filled moment, we return. | |
| var split_afternoon = 12 //24hr time to split the afternoon | |
| var split_evening = 17 //24hr time to split the evening | |
| var currentHour = parseFloat(m.format("HH")); | |
| if(currentHour >= split_afternoon && currentHour <= split_evening) { |
| #!/usr/bin/perl | |
| use Mysql; | |
| use strict; | |
| use vars qw($school_name); | |
| use vars qw($pass); | |
| require "./cgi-lib.pl"; |
| @mixin position( $top: null, $right: null, $bottom: null, $left: null ) { | |
| @if $top { top: $top; } | |
| @if $right { right: $right; } | |
| @if $bottom { bottom: $bottom; } | |
| @if $left { left: $left; } | |
| } |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| // gecko and webkit | |
| // details here https://developer.mozilla.org/en-US/docs/DOM/event.initKeyEvent | |
| var keyboardEvent = document.createEvent("KeyboardEvent"); | |
| var initMethod = typeof keyboardEvent.initKeyboardEvent !== 'undefined' ? "initKeyboardEvent" : "initKeyEvent"; | |
| keyboardEvent[initMethod]( | |
| "keydown", // event type : keydown, keyup, keypress | |
| true, // bubbles |
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'fileutils' | |
| require 'date' | |
| require 'uri' | |
| # usage: ruby import.rb my-blog.xml | |
| # my-blog.xml is a file from Settings -> Basic -> Export in blogger. | |
| data = File.read ARGV[0] |
Prereq:
apt-get install zsh
apt-get install git-coreGetting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh