Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am bryan-snyder on github.
  • I am brockvond (https://keybase.io/brockvond) on keybase.
  • I have a public key ASD1cYazldhPDj3sAMKwsfh2W265jVhNleP23tqvCqG4mwo

To claim this, I am signing this object:

@bryan-snyder
bryan-snyder / wordpress-install.sh
Created May 30, 2016 22:16
Wordpress Bash Install Script
#!/bin/bash
# Setup Variables
DBNAME=mydatabase
DBUSER=databaseuser
DBPASS=dnpass
DBHOST=localhost
DBPREFIX=9239jej9md_
URL=http://urlofsite.com
@bryan-snyder
bryan-snyder / .bash_profile
Created January 8, 2016 11:36 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@bryan-snyder
bryan-snyder / icons.sass
Created December 31, 2015 09:34 — forked from nickawalsh/icons.sass
Auto Hi-res Sprites
@import compass
$icons: sprite-map("icons/*.png")
$icons-hd: sprite-map("icons-hd/*.png")
i
background: $icons
display: inline-block
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi)
background: $icons-hd
@bryan-snyder
bryan-snyder / Contract Killer 3.md
Created December 11, 2015 05:05 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: October 8th 2015
  • Original post

@bryan-snyder
bryan-snyder / class-woocommerce-gateway-purchase-order.php
Last active January 16, 2016 14:29
Remove this code to make field not required.
//remove this dumb shit and make PO field not required
//lol $pooorder
public function validate_fields () {
$poorder = $this->get_post( 'po_number_field' );
if( ! $poorder ) {
if ( function_exists ( 'wc_add_notice' ) ) {
// Replace this old ass f'in $woocommerce_add_error() function.
wc_add_notice ( __ ( 'Please enter your PO Number.', 'woocommerce-gateway-purchase-order' ), 'error' );
} else {
@bryan-snyder
bryan-snyder / gist:8a7a086f3225b8b4ebcd
Created October 6, 2015 23:43 — forked from mikejolley/gist:1547491
WooCommerce - A filter to add a tracking (or any other field for that matter) to order emails to customers.
/* To use:
1. Add this snippet to your theme's functions.php file
2. Change the meta key names in the snippet
3. Create a custom field in the order post - e.g. key = "Tracking Code" value = abcdefg
4. When next updating the status, or during any other event which emails the user, they will see this field in their email
*/
add_filter('woocommerce_email_order_meta_keys', 'my_custom_order_meta_keys');
function my_custom_order_meta_keys( $keys ) {
$keys[] = 'Tracking Code'; // This will look for a custom field called 'Tracking Code' and add it to emails
@bryan-snyder
bryan-snyder / The Technical Interview Cheat Sheet.md
Last active August 29, 2015 14:28 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@bryan-snyder
bryan-snyder / python_resources.md
Last active August 29, 2015 14:25 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@bryan-snyder
bryan-snyder / rails_resources.md
Last active August 29, 2015 14:25 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h