Skip to content

Instantly share code, notes, and snippets.

View heaversm's full-sized avatar

Mike Heavers heaversm

View GitHub Profile
@hay
hay / has-overflow-scrolling.js
Created November 7, 2012 16:14
Check if a browser supports the overflow-scrolling CSS property, optionally with a prefix
function hasOverflowScrolling() {
var prefixes = ['webkit', 'moz', 'o', 'ms'];
var div = document.createElement('div');
var body = document.getElementsByTagName('body')[0];
var hasIt = false;
body.appendChild(div);
for (var i = 0; i < prefixes.length; i++) {
var prefix = prefixes[i];
/* modernizr-test_position_fixed_ios.js
* Original by Daniel Ott (https://gist.github.com/1333800)
* 3 March 2011
* Updated by Philipp Söhnlein 3 November 2011
* Custom Tests using Modernizr's addTest API
*/
/* iOS
* There may be times when we need a quick way to reference whether iOS is in play or not.
* While a primative means, will be helpful for that.
@PhilippSoehnlein
PhilippSoehnlein / modernizr-test_position_fixed_ios.js
Created November 3, 2011 12:23
Modernizr Test for position fixed (including iOS tests)
/* modernizr-test_position_fixed_ios.js
* Original by Daniel Ott (https://gist.github.com/1333800)
* 3 March 2011
* Updated by Philipp Söhnlein 3 November 2011
* Custom Tests using Modernizr's addTest API
*/
/* iOS
* There may be times when we need a quick way to reference whether iOS is in play or not.
* While a primative means, will be helpful for that.
@genomics-geek
genomics-geek / setup_MacOSX_env.md
Last active November 20, 2017 17:58
Setting up your MacOSX machine as a dev machine
@smukkejohan
smukkejohan / app.js
Created October 6, 2014 10:17
Arduino to Web with Node.js, johnny-five and express
var five = require("johnny-five")
// or "./lib/johnny-five" when running from the source
var express = require('express');
var app = express();
var value = 0;
// Add headers
@moorage
moorage / opencv-xphoto-howto.md
Last active March 8, 2019 17:01
How I built xphoto module into opencv-3.0.0
@tdreyno
tdreyno / easing.scss
Created May 7, 2011 02:02
Easing functions for Sass 3.1
@function linear() {
@return cubic-bezier(0.250, 0.250, 0.750, 0.750); }
@function ease() {
@return cubic-bezier(0.250, 0.100, 0.250, 1.000); }
@function ease-in() {
@return cubic-bezier(0.420, 0.000, 1.000, 1.000); }
@function ease-in-quad() {
@return cubic-bezier(0.550, 0.085, 0.680, 0.530); }
@jaredpalmer
jaredpalmer / razzle.config.js
Last active April 30, 2019 17:19
Razzle with HappyPack, TypeScript, SCSS, and Vendor bundle
'use strict';
const autoprefixer = require('autoprefixer');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const path = require('path');
const {
CheckerPlugin,
TsConfigPathsPlugin,
} = require('awesome-typescript-loader');
const HappyPack = require('happypack');
@genekogan
genekogan / fix.sh
Last active October 3, 2019 23:59
fix luarocks and install neural-style on a fresh paperspace ML-in-a-box template
# repair luarocks
sudo rm -rf ~/.cache/luarocks/
luarocks install loadcaffe
luarocks install cutorch
luarocks install cudnn
luarocks install cunn
# get cudnn (https://developer.nvidia.com/cudnn) and then (assuming cudnn 7.*) ...
git clone https://github.com/soumith/cudnn.torch.git -b R7 && cd cudnn.torch && luarocks make cudnn-scm-1.rockspec && cd .. && rm -rf cudnn.torch
@fanzeyi
fanzeyi / scroll.css
Created November 1, 2012 18:34
Google Plus Scroll Style
::-webkit-scrollbar{
height:16px;
overflow:visible;
width:16px;
}
::-webkit-scrollbar-button{
height:0;
width:0;
}