Skip to content

Instantly share code, notes, and snippets.

View kylesuss's full-sized avatar

Kyle Suss kylesuss

View GitHub Profile
module.exports = function(grunt) {
grunt.initConfig({
concat: {
options: {
separator: ';'
},
dist: {
src: ['js/jquery.js', 'js/pin.js', 'js/animation.js'],
dest: 'js/script.js'
var scrollLevel = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
$('html, body').animate({
scrollTop: $("#elementID").offset().top
}, 2000);
.parent {
position: relative
}
.child {
width: 100%;
display: block;
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
@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; }
@kylesuss
kylesuss / EngineYard - Sidekiq
Last active December 27, 2015 04:58
Using Sidekiq on EngineYard w/out Chef
# rails_root/deploy/before_restart.rb
# kill sidekiq processes
run "pkill [s]idekiq"
# rails_root/deploy/after_restart.rb
# restart sidekiq
# The & at the end tells Sidekiq to run in the background. It was necessary.
run "cd /data/APPNAME/current && sudo -u deploy RAILS_ENV=production /usr/local/bin/bundle exec sidekiq -e production -c 5 &"
@kylesuss
kylesuss / OpenShift CLI
Last active December 26, 2015 15:39
How to create an app via the CLI for OpenShift
Run 'rhc create-app' to create your first application.
Do-It-Yourself 0.1 rhc create-app <app name> diy-0.1
JBoss Application Server 7 rhc create-app <app name> jbossas-7
JBoss Enterprise Application Platform 6.1.0 rhc create-app <app name> jbosseap-6
Jenkins Server rhc create-app <app name> jenkins-1
Node.js 0.10 rhc create-app <app name> nodejs-0.10
Node.js 0.6 rhc create-app <app name> nodejs-0.6
PHP 5.3 rhc create-app <app name> php-5.3
Perl 5.10 rhc create-app <app name> perl-5.10
<script src="http://123.456.7.89:9000/target/target-script-min.js#anonymous"></script>
mysqld_safe
array.inject(:+)