Skip to content

Instantly share code, notes, and snippets.

View evs's full-sized avatar

Elliot Schoemaker evs

  • Brisbane, Australia
View GitHub Profile
@evs
evs / install_postgresql.sh
Created November 15, 2018 06:00 — forked from dstroot/install_postgresql.sh
Install PostgreSQL on Amazon AMI
#!/bin/bash
###############################################
# To use:
# https://raw.github.com/gist/2776351/???
# chmod 777 install_postgresql.sh
# ./install_postgresql.sh
###############################################
echo "*****************************************"
echo " Installing PostgreSQL"
echo "*****************************************"

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name

Magento SQL Snippets

Clear Temporary Data Tables

TRUNCATE `log_customer`;
TRUNCATE `log_quote`;
TRUNCATE `log_summary`;
TRUNCATE `log_url`;
TRUNCATE `log_url_info`;
@evs
evs / gist:4077241
Created November 15, 2012 07:40 — forked from davidalexander/gist:1086455
Magento Snippets

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex

@evs
evs / install.sh
Created August 29, 2012 03:24 — forked from maggit/install.sh
Chef installer for OS X 10.8 Mountain Lion
#!/bin/bash
# This is the current stable release to default to, with Omnibus patch level (e.g. 10.12.0-1)
# Note that the chef-full template downloads 'x.y.z' not 'x.y.z-r' which should be a duplicate of the latest -r
release_version="10.12.0-1"
use_shell=0
# Check whether a command exists - returns 0 if it does, 1 if it does not
exists() {
if command -v $1 &>/dev/null
@evs
evs / Shopify API CLI
Created September 20, 2011 23:34 — forked from resistorsoftware/Shopify API CLI
A simple way to take advantage of the Shopify API gem CLI
#!/usr/bin/env ruby
require 'rubygems'
require 'shopify_api'
require 'thor'
require 'abbrev'
require 'yaml'
module ShopifyAPI
class Cli < Thor
include Thor::Actions
@evs
evs / gist:1121506
Created August 2, 2011 23:34 — forked from coop/Deploy
Deploy to S3 - Asset Pipeline, S3 and Heroku
namespace :deploy do
desc "Deploy to Heroku"
task :heroku do
Rake::Task["deploy:precompile_assets_and_upload_to_s3"].invoke
Rake::Task["deploy:push_heroku"].invoke
end
desc "Precompile assets and upload to s3"
task :precompile_assets_and_upload_to_s3 do
storage = Fog::Storage.new :provider => 'AWS', :aws_access_key_id => "123", :aws_secret_access_key => "123"
@evs
evs / adapt.js
Created April 13, 2011 09:07 — forked from nathansmith/adapt.js
// Edit to suit your needs.
var ADAPT_CONFIG = {
// Where is your CSS?
path: 'assets/css/',
// false = Only run one time, when page first loads.
// true = Change for window resize or page tilt too.
dynamic: true,
// First range entry is the minimum.
@evs
evs / config.ru
Created December 15, 2010 07:45 — forked from scottwater/config.ru
require 'sj'
run SinatraJekyll
@evs
evs / templator.rb
Created October 7, 2010 22:03 — forked from ilpoldo/templator.rb
# Cleaning up and extending the Gemfile
remove_file 'Gemfile'
create_file 'Gemfile', <<-GEMFILE
source 'http://rubygems.org'
gem 'rails', '3.0.1'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'haml', '~> 3.0.12'