Skip to content

Instantly share code, notes, and snippets.

View egoens's full-sized avatar

Erik Goens egoens

View GitHub Profile
@egoens
egoens / iphones-responsive.css
Last active August 29, 2015 14:22
General responsive containers for iPhones
/***********
iPhone 2G-4S
************/
/* iPhone 2G-4S In Portrait & Landscape */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
}
@egoens
egoens / psql_table_exporter.sh
Created August 14, 2015 16:57
Shell script for exporting all tables for any given postgresql database_name
#!/bin/bash
# exports separate sql files for each table in the db. excludes "pg_" and "sql_" prefixed tables
for table in $(psql database_name -t -c "Select table_name From information_schema.tables Where table_type='BASE TABLE' and table_name not like 'pg_%' and table_name not like 'sql_%'");
do pg_dump -t $table database_name > /path/to/export/your/tables/$table.sql;
done;
@ne8il
ne8il / d3.md
Last active December 15, 2015 03:59
List of resources for learning D3.js
@letsspeak
letsspeak / installing_cpanm_to_centos
Created March 29, 2013 15:25
installing cpanm to CentOS 6.3
$ cd /usr/bin/
$ sudo curl -LOk http://xrl.us/cpanm
$ sudo chmod +x cpanm
$ sudo cpanm local::lib
-> FAIL Installing ExtUtils::MakeMaker failed. See /root/.cpanm/build.log for details.
-> FAIL Bailing out the installation for App-cpanminus-1.5018. Retry with --prompt or --force.
$ sudo yum install perl-devel
2013-09-28 15:54:13.369 iOSFontListTest[3753:60b] Font Family Names (
"Academy Engraved LET",
"Al Nile",
"American Typewriter",
"Apple Color Emoji",
"Apple SD Gothic Neo",
Arial,
"Arial Hebrew",
"Arial Rounded MT Bold",
Avenir,
@egoens
egoens / Readme.md
Last active May 9, 2016 19:21
Generate/Destory rails scaffolding

Requirements

Must create a docs folder and put models.yml inside this folder.

@laserlemon
laserlemon / Rails 3 Environment
Created October 1, 2010 12:17
Snow Leopard, Homebrew, Git, RVM, Ruby, Rails, Passenger, Apache, MySQL, Memcached and ImageMagick
# 2010-10-01
#
# Mac OS X 10.6.3
# Homebrew 0.7
# Xcode 3.2.4
# Git 1.7.3.1
# RVM 1.0.12
# Ruby 1.9.2, 1.8.7
# Rails 3.0.0
# Passenger 3.0.0.pre4
@conleym
conleym / aws.sh
Last active November 2, 2016 18:15
Export AWS key variables based on profile name
# Shortcut for assigning a heredoc to a variable.
# http://stackoverflow.com/a/8088167
define() {
# read will have exit status 1 whenever it assigns to a variable or it gets to EOF.
read -r -d '' "${1}" || true
}
_other_aws_common_stuff() {
export AWS_DEFAULT_PROFILE="${AWS_PROFILE}"
local SCRIPT
@joyrexus
joyrexus / README.md
Last active January 20, 2017 12:08
Abbo’s Alley I

Abbo's Alley I

Quick demo showing how to add Sewanee trail data to a map using Mapbox GL JS.

The key building blocks here are sources and layers. Sources contain the underlying geo data. Layers let you specify how to style this data.

In our demo we're adding two data sources: the trail route for one section of Abbo's Alley and markers indicating exit points. The trail data was taken from a geojson file containing information about all trails on the Domain.

About Abbo's Alley

files:
/etc/nginx/conf.d/proxy.conf:
content: |
client_max_body_size 25M;
server_names_hash_bucket_size 128;
upstream backend {
server unix:///var/run/puma/my_app.sock;
}