On mac:
- Download the latest release.
- Extract the binary and place it in
/usr/local/bin.
| $(document).ready(function() { | |
| $(document).on('click keypress', function(event) { | |
| if (event.type == 'click' || event.which == 13) { | |
| $(event.target).trigger('activate'); | |
| } | |
| }); | |
| $("button").on('activate', function() { | |
| alert('Button activated!'); | |
| }); | |
| }); |
| <!------------------------ AboutPage layout --> | |
| <header> | |
| <!-- Header stuff --> | |
| <header> | |
| <% include HeroBanner %> | |
| {$HeroBannerContent} | |
| <% end_include %> | |
| {$Content} | |
| <footer> |
On mac:
/usr/local/bin.| /Applications/ImageAlpha.app/Contents/MacOS/pngquant 64 *.png --ext .png --force |
| #!/usr/bin/env bash | |
| # Usage: | |
| # 1. Save script in project. | |
| # 2. Run "chmod +x find-unused-sass-variables.sh". | |
| # 3. Run script, pointing to Sass directory: "./find-unused-sass-variables.sh ./scss". | |
| VAR_NAME_CHARS='A-Za-z0-9_-' | |
| find "$1" -type f -name "*.scss" -exec grep -o "\$[$VAR_NAME_CHARS]*" {} ';' | sort | uniq -u |
| <figure class="video-player"> | |
| <video preload="none" width="1280" height="720" poster="video.jpg"> | |
| <source src="video.webm" type="video/webm" /> | |
| <source src="video.mp4" type="video/mp4" /> | |
| </video> | |
| <button class="play-toggle">Toggle play</button> | |
| <button class="mute-toggle">Toggle mute</button> | |
| </figure> | |
| <script> | |
| // Initialize video player |
| #!/bin/bash | |
| # Uses Gource (http://gource.io) to generate a lossless PPM and a high quality MP4 visualizing the history of a Git repo. | |
| # By Jayden Seric: https://gist.github.com/jaydenseric/df3263eb3c33856c11ce | |
| # Install Gource and FFmpeg with Homebrew: | |
| # brew install gource | |
| # brew install ffmpeg |
| // Fixes some browsers allowing invalid forms to submit, mostly an issue with Safari allowing empty required fields. | |
| // http://caniuse.com/#search=required | |
| window.addEventListener('submit', (event) => { | |
| if (!event.target.noValidate && !event.target.checkValidity()) { | |
| event.preventDefault() | |
| window.alert('Please correct invalid form fields and resubmit.') | |
| } | |
| }) |