Skip to content

Instantly share code, notes, and snippets.

View kylesuss's full-sized avatar

Kyle Suss kylesuss

View GitHub Profile
@kylesuss
kylesuss / Foundation 4 Grid Fix for IE8
Created November 5, 2013 17:55
The grid is jacked in IE8 for Foundation 4 as they use media queries for certain elements. This fixes it and uses the class that Rails adds to the HTML element for IE8 in Rails 4.
.ie8 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.ie8 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.ie8 .row.large-collapse .column,
.ie8 .row.large-collapse .columns { padding: 0; }
.ie8 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.ie8 .row .row.large-collapse { margin: 0; }
.ie8 .column, .ie8 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.ie8 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
.parent {
position: relative
}
.child {
width: 100%;
display: block;
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
$('html, body').animate({
scrollTop: $("#elementID").offset().top
}, 2000);
var scrollLevel = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
module.exports = function(grunt) {
grunt.initConfig({
concat: {
options: {
separator: ';'
},
dist: {
src: ['js/jquery.js', 'js/pin.js', 'js/animation.js'],
dest: 'js/script.js'
# List active connections
sudo netstat -ntlp
# Find Node install path
whereis node
var _ = {
now: Date.now || function() { return new Date().getTime(); },
throttle: function(func, wait, options) {
var context, args, result;
var timeout = null;
var previous = 0;
options || (options = {});
var later = function() {
$(window).on('beforeunload', function() {
$(window).scrollTop(0);
});
<VirtualHost *:80>
ServerName myapp.example.com
RewriteEngine On
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName myapp.example.com
DocumentRoot /var/www/myapp/current/public
<Directory /var/www/myapp/current/public>
{
"Version": "2014-01-01",
"Statement": [{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": { "AWS": "*" },
"Action": ["s3:GetObject"],
"Resource": ["arn:aws:s3:::BUCKET_NAME/*" ]
}]
}