Skip to content

Instantly share code, notes, and snippets.

View mahish's full-sized avatar

Jiří Maha mahish

View GitHub Profile
@mahish
mahish / Hypermiling.md
Last active December 14, 2015 13:18
publishing workflow base on https://micah.codes/
  • 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
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');
@mahish
mahish / Video cover
Created December 12, 2015 12:11
Set size of a video to fill a hero wrapper
// set size of the video to fill the hero wrapper
if (ratio >= vidratio) {
$(video).css({
minHeight: '',
height: '',
minWidth: windowwidth,
width: '100%'
});
} else {
$(video).css({
@mahish
mahish / index.html
Created October 23, 2015 20:14 — forked from flesler/index.html
Anchor navigation powered by jquery.scrollTo
<!-- 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>

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt