Skip to content

Instantly share code, notes, and snippets.

View aaronfischer's full-sized avatar

Aaron Fischer aaronfischer

View GitHub Profile
@aaronfischer
aaronfischer / controllers.application.js
Last active April 21, 2016 05:44
Mirage Nested Relationships
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@aaronfischer
aaronfischer / gist:ab2e64ddd7588eda3d92
Last active March 16, 2016 20:21
ffmpeg - re-encode audio into additional stereo track, do not re-encode video
ffmpeg -i "input.mkv" \
-map 0:0 -map 0:1 -map 0:1 \
-c:v copy \
-c:a:0 libfaac -b:a:0 192k -ac 2 \
-c:a:1 copy \
"output.conv.mkv"
@aaronfischer
aaronfischer / gist:adf4d1d584df69c064c7
Created July 13, 2015 02:48
GIT - delete merged branches
git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -d
@aaronfischer
aaronfischer / browserUpdate.html
Last active August 29, 2015 14:12
browser update modal
<div id="browserUpdate" class="browserUpdate overlay">
<a href="#" class="overlay-close js-close"><i class="icn-x icon-box -rev"></i></a>
<div class="view view-directory swiper-container browserUpdate-container">
<div class="swiper-slide">
<div class="row cf">
<div class="col-18 ac ci browserUpdate-info">
<img class="browserUpdate-warning-icon" src="/sites/all/themes/adu/assets/media/img/optimized/browserUpdate/warning.png" alt="warning icon">
<h4>Did you know your browser is out of date?</h4>
<p>To get the best possible experience using our website we recommend that you upgrade to a newer version or other web broswer. A list of the most popular web browsers can be found below. </p>
<p><strong>By closing this window you acknowledge that your experience on this website may be degraded.</strong></p>
/* ----------------------------------------------------------------------------------------------------------
03 SmartResize
---------------------------------------------------------------------------------------------------------- */
(function($,sr){
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var debounce = function (func, threshold, execAsap) {
var timeout;
@aaronfischer
aaronfischer / smoothscroll.js
Last active August 23, 2018 19:19
Smooth Scroll / Scroll to Section on Load
/* ----------------------------------------------------------------------------------------------------------
03 scroll to #section-id-of-div
---------------------------------------------------------------------------------------------------------- */
function smoothScroll(el, target){
// if the hash is in the URL but not on the page... ex #cosmetic-surgery but not #section-this-div
if(el !== null){
var $this = $(el),
target = el.hash,
$target = $(target);
// check if the target has an offset, if its NOT undefined then run the code to allow things to scroll
@aaronfischer
aaronfischer / imgToSVG.js
Created July 13, 2014 05:31
Convert all SVG Images to inline SVGs
/* ----------------------------------------------------------------------------------------------------------
03 Converts all svg images to inline svgs
---------------------------------------------------------------------------------------------------------- */
function imgToSvg(){
jQuery('img.svg').each(function(){
var $img = jQuery(this);
var imgID = $img.attr('id');
var imgClass = $img.attr('class');
var imgURL = $img.attr('src');
@aaronfischer
aaronfischer / gist:bba29a2001d489293250
Created July 13, 2014 05:26
Smart Resize Function
$(document).ready(function() {
$(window).smartresize(function(){
// call a function that needs to run on resize
homePanel();
});
});
(function($,sr){
// debouncing function from John Hann
@aaronfischer
aaronfischer / gulpfile.js
Created July 13, 2014 05:07
Gulp File - *working document*
var gulp = require('gulp'),
// sass = require('gulp-ruby-sass'),
compass = require('gulp-compass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
pngcrush = require('imagemin-pngcrush'),
rename = require('gulp-rename'),