| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Include jQuery from somewhere, must use version 1.8 or above --> | |
| <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | |
| <!-- Include latest jquery.scrollTo, currently 2.1.0, can download from https://github.com/flesler/jquery.scrollTo/releases --> | |
| <script type="text/javascript" src="//cdn.jsdelivr.net/jquery.scrollto/2.1.0/jquery.scrollTo.min.js"></script> | |
| <!-- Initialize the plugin, the contents of the script can be inlined here, of course --> | |
| <script type="text/javascript" src="js/init.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // set size of the video to fill the hero wrapper | |
| if (ratio >= vidratio) { | |
| $(video).css({ | |
| minHeight: '', | |
| height: '', | |
| minWidth: windowwidth, | |
| width: '100%' | |
| }); | |
| } else { | |
| $(video).css({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require('gulp'); | |
| // css modules | |
| var postcss = require('gulp-postcss'); | |
| var autoprefixer = require('autoprefixer'); | |
| var cssnano = require('gulp-cssnano'); | |
| // js modules | |
| var jsminify = require('gulp-uglify'); | |
| var jshint = require('gulp-jshint'); |
- Blog articles written in Markdown
- Source code pushed to Github repo
- TravisCI checks out master and compiles site using NodeJS based static site generator, Metalsmith
- Dist folder is automatically pushed to Amazon S3
- Cloudflare CDN is instructed to clear cache and pull new assets forward
- Static site is served to client over HTTPS using HTTP/2 from the nearest Cloudflare CDN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| // https://medium.com/@mariusc23/hide-header-on-scroll-down-show-on-scroll-up-67bbaae9a78c#.jim2ghyzy | |
| // Hide Header on on scroll down | |
| var didScroll; | |
| var lastScrollTop = 0; | |
| var delta = 5; | |
| var navbarHeight = $('body > header').outerHeight(); | |
| $(window).scroll(function(event){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var svg = document.querySelector( "svg" ); | |
| var svgData = new XMLSerializer().serializeToString( svg ); | |
| var canvas = document.createElement( "canvas" ); | |
| var ctx = canvas.getContext( "2d" ); | |
| var img = document.createElement( "img" ); | |
| img.setAttribute( "src", "data:image/svg+xml;base64," + btoa( svgData ) ); | |
| img.onload = function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| [ | |
| { "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} }, | |
| { "keys": ["super+v"], "command": "paste_and_indent" }, | |
| { "keys": ["super+shift+v"], "command": "paste" }, | |
| { | |
| "keys": ["super+alt+shift+f"], // create your own key command combination here! | |
| "command": "html_beautify", // command that executes html_beautify | |
| "context": [{ | |
| // these options ensure that the command is executed in the right files/context | |
| "key": "selector", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Breakpoints | |
| $screen-sm: 500px; | |
| $screen-md: 768px; | |
| $screen-lg: 1024px; | |
| $screen-lg: 1500px; | |
| // Font Sizes | |
| $base-font-size: 1rem; | |
| $base-font-sizes: ( | |
| null : 1rem, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Gets the browser name or returns an empty string if unknown. | |
| * This function also caches the result to provide for any | |
| * future calls this function has. | |
| * http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser#answer-31479176 | |
| * | |
| * @returns {string} | |
| */ | |
| var browser = function() { | |
| // Return cached result if avalible, else get result then cache it. |
OlderNewer