Skip to content

Instantly share code, notes, and snippets.

View beejhuff's full-sized avatar

Bryan "BJ" Hoffpauir beejhuff

View GitHub Profile
@mhawksey
mhawksey / gist:3436048
Last active May 8, 2016 23:49
Google Spreadsheet/Apps Script custom function for getting Klout scores for Twitter screen name(s). You can File > Make a copy of this template https://docs.google.com/spreadsheet/ccc?key=0AqGkLMU9sHmLdDVzZWdLbElhM3NYM2VQZi1lYjZXUUE&usp=drive_web#gid=0 for working version of the code
/* Copyright 2012 Martin Hawksey (email : martin.hawksey@gmail.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@onyxraven
onyxraven / rds.sh
Last active June 21, 2022 13:42 — forked from douglasjarquin/gist:2208690
Amazon RDS Performance Tuning Settings
#XLarge DBInstanceClassMemory = 15892177440 = 14.8GB
#/32 = 496630545 = 473MB
#/64 = 248315272 = 236MB
#/128 = 124157636 = 118MB
#/256 = 62078818 = 59MB
#/512 = 31039409 = 29MB
#/12582880 = 1263 #default same divisor as max_connections = 4041.6MB = 4237924762
#/25165760 = 623 # half of max_connections = 1993.6MB
#/50331520 = 315 # quarter of max_connections = 1008MB = 1056964608
#*(3/4) #default innodb pool size = 11922309120
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active February 25, 2024 17:35
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@parhamr
parhamr / 0: Magento 1.12 Enterprise multi-store cluster configuration.md
Last active October 13, 2023 14:20
A highly available, fault tolerant, distributed, and load balanced LEMP cluster.
@paulmars
paulmars / gist:6528004
Created September 11, 2013 18:45
ssh back to my mac
# cribed from this post
# http://onethingwell.org/post/27835796928/remote-ssh-bact-to-my-mac
dns-sd -E # gets your member id for icloud
# SSH command
ssh -2 -6 [USERNAME]@[COMPUTER NAME].[account number].members.btmm.icloud.com
# ~/.ssh/config
Host mac-remote
@tegansnyder
tegansnyder / .htaccess
Created September 18, 2013 14:17
Example .htaccess file with proper expiry headers set for google page speed test. Everything else is commented out and merged into the httpd.conf file for speed see: https://gist.github.com/tegansnyder/6609688
############################################
## uncomment these lines for CGI mode
## make sure to specify the correct cgi php binary file name
## it might be /cgi-bin/php-cgi
# Action php5-cgi /cgi-bin/php5-cgi
# AddHandler php5-cgi .php
DirectoryIndex index.php
@erfanimani
erfanimani / .gitignore
Last active June 1, 2019 10:22
A refactored and modern .gitignore for Magento. Compatible for Git versions 2.7.0+. See this revision to use it for versions lower than 2.7.0: https://gist.github.com/erfanimani/8856964/886f5d79d229c21b9c712155c362e5fc1c61a12a
### MAGENTO DIRECTORIES
# Ignore everything in media, except for the htaccess files
# Also include the Lazy Catalog Images (LCI) .htaccess if that's installed
# (https://github.com/AOEpeople/Aoe_LazyCatalogImages)
/media/*
!/media/.htaccess
!/media/customer/.htaccess
!/media/downloadable/.htaccess
!/media/catalog/product/LCI/.htaccess
@cstipkovic
cstipkovic / install_my_env.sh
Last active May 7, 2022 19:19 — forked from zenorocha/.hyper.js
My Mac OS X setup script
#!/bin/sh
# Install XCode and Commando Line Tools
xcode-select --install
# Install homebrew
/usr/bin/ruby -e " $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Cask for Versions
brew tap caskroom/versions
@phips
phips / wip.py
Last active June 19, 2017 14:20
VMware Fusion Ansible dynamic inventory
#!/usr/bin/env python
import sys
import subprocess
import re
import string
try:
import json
except:
import simplejson as json