Skip to content

Instantly share code, notes, and snippets.

View kpheasey's full-sized avatar

Kevin Pheasey kpheasey

View GitHub Profile
@kpheasey
kpheasey / rsvp_sxsw_controller.rb
Last active February 8, 2016 22:32
Gibbon Signup
# app/controllers/rsvp_sxsw_controller.rb
class RsvpSxswController < ApplicationController
MAILCHIMP_API_KEY = "XXXX"
MAILCHIMP_LIST_ID = "XXXX"
# GET /rsvp_sxsw
def new
end
@kpheasey
kpheasey / infinite_scroll.js.coffee
Last active October 6, 2015 16:29
RailsScript Infinite Scroll
window.App ||= {}
class App.GemgentoCategories extends App.Base
show: =>
new App.ProductGrid()
@infiniteScroll()
return
@kpheasey
kpheasey / magento_permissions.sh
Last active October 1, 2015 15:58
Magento Permissions
#Set Magento root directory permissions. Call using the following:
# curl -sL https://goo.gl/b1NkHW | sudo bash
#!/bin/bash
if [ ! -f ./app/etc/local.xml ]; then
echo "-- ERROR"
echo "-- This doesn't look like a Magento install. Please make sure"
echo "-- that you are running this from the Magento main doc root dir"
exit
fi
@kpheasey
kpheasey / ark_instance.sh
Last active July 27, 2023 20:12
DO Ubuntu 14.04 Droplet to ARK Server
#!/bin/bash
# Updating Ubunut
echo "updating ubunutu... please be patient"
apt-get update && apt-get upgrade -y
echo "installing required packages... please be patient"
apt-get install htop lib32gcc1 -y
# Create steam user if needed
@kpheasey
kpheasey / 0000_packages.config
Last active September 16, 2019 21:56 — forked from gcarrion-gfrmedia/0000_packages.config
AWS Elastic Beanstalk Ruby 2.2 Puma Sidekiq
packages:
yum:
git: []
htop: []
@kpheasey
kpheasey / active_record_extension.rb
Last active August 29, 2015 14:14
SELECT SUM and SELECT SUM CASE ActiveRecord methods
module ActiveRecordExtension
extend ActiveSupport::Concern
module ClassMethods
# Add a SELECT SUM() by CASE to query.
#
# @param cases [Hash(:attr, :val, :operand), Array(Hash(:attr, :val, :operator))]
# @param sum_field [Symbol, String]