Skip to content

Instantly share code, notes, and snippets.

View ericwilson's full-sized avatar

Eric Wilson ericwilson

View GitHub Profile
@ericwilson
ericwilson / keybase.md
Created February 21, 2018 16:38
Keybase gist

Keybase proof

I hereby claim:

  • I am ericwilson on github.
  • I am ericwilson (https://keybase.io/ericwilson) on keybase.
  • I have a public key ASAf1nQ_rWZVnMjuqejSS6U0nsD0nh0jE7ipB-Sgsyg2gwo

To claim this, I am signing this object:

@ericwilson
ericwilson / Checkout.md
Last active August 29, 2015 14:11
CrowdSeats Checkout API

CrowdSeats Checkout API

POST /Checkout/:ticket_id

Purchases a ticket identified by ticket_id

Parameter Value Type Location Description
@ericwilson
ericwilson / solr.conf
Last active August 29, 2015 14:00
Service script for the Solr search engine
# Service script for the Solr search engine
description "Service script for the Solr search engine"
author "Eric Wilson <eric@coolcompany.com>"
version "1.0.0"
start on runlevel [2345]
stop on runlevel [016]
kill timeout 30
@ericwilson
ericwilson / withcalculate.html
Created April 27, 2014 02:15
Django template's "with" statement to calculate values
{% with border_value=photo.ispromo|yesno:"4px_solid_black," %}
{% cloudinary photo.original_image_id width=photo.width height=photo.height crop="fill" angle='exif' gravity='faces' border=border_value %}
{% endwith %}
@ericwilson
ericwilson / withconditional.html
Last active August 29, 2015 14:00
Django template's "with" statement to calculate values
{% if photo.ispromo %}
{% cloudinary photo.original_image_id width=photo.width height=photo.height crop="fill" angle='exif' gravity='faces' border="4px_solid_black" %}
{% else %}
{% cloudinary photo.original_image_id width=photo.width height=photo.height crop="fill" angle='exif' gravity='faces' %}
{% endif %}
@ericwilson
ericwilson / fabfile.py
Created April 27, 2014 02:04
Fabric deploy task: tags the set of files with the name of the host machine the deploy is going to + a unique time stamp
# Default directory for the installation
code_dir = '/opt/your_deployment'
.
.
.
@task
def tag(branch):
"""
Tags the release
@ericwilson
ericwilson / domainredirection
Last active August 29, 2015 14:00
Apache Virtual Hosts and Domain Redirection
<VirtualHost *:80>
ServerName www.yourdomain.com
Redirect permanent / http://yourdomain.com/
</VirtualHost>
@ericwilson
ericwilson / customlogs4apachevirtualhost
Last active August 29, 2015 14:00
Custom Logs for Apache Virtual Host
<VirtualHost *:80>
ServerName www.yourdomain.com
ServerAlias www.yourdomain.com
..
.. other custom settings
..
ErrorLog "/var/log/yourlog/error.log"
CustomLog "/var/log/yourlog/access.log" common
@ericwilson
ericwilson / curl2checkexif
Created April 27, 2014 01:46
Use cURL to check Exif data on Cloudinary images
curl 'https://API_KEY:API_SECRET@api.cloudinary.com/v1_1/CLOUD_NAME/resources/image?exif=1'
@ericwilson
ericwilson / newrelicnotify
Created April 27, 2014 01:35
New Relic Deployment Notification
curl -H "x-api-key:8d00e2869400597af4a114d31789088e3724f391f287a4c"
-d "deployment[application_id]=1114517"
-d "deployment[description]=This deployment was sent using curl"
-d "deployment[revision]=1242"
-d "deployment[changelog]=many hands make light work"
-d "deployment[user]=Joe User" https://rpm.newrelic.com/deployments.xml