Skip to content

Instantly share code, notes, and snippets.

@desmondmorris
desmondmorris / gist:8552669
Last active January 4, 2016 02:09
Things we did in Barcelona

Kiosko - Awesome burgers down in El Born District

Picasso Museum- El Born District

Catalana History Museum - Born

Form Boix - Awesome Bakery

Cornelia and Co - One of my favorite places. Great food. You have to eat the Carrot cake

@desmondmorris
desmondmorris / geocode
Last active January 4, 2016 01:59
geocode VS parse responses - expected 422
curl -IL "http://api.geocod.io/v1/geocode?q=garbage+address&api_key=APIKEY"
HTTP/1.1 422 Unprocessable Entity
Date: Wed, 22 Jan 2014 01:49:34 GMT
Server: Apache
X-Powered-By: PHP/5.4.24
Cache-Control: no-cache
Access-Control-Allow-Origin: *
Content-Type: application/json
Copyright (c) YYYY Desmond Morris
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject
to the following conditions:
@desmondmorris
desmondmorris / nginx-vhost.sh
Created January 2, 2014 21:30
Automatically creating new virtual hosts with Nginx
# Script by: Seb Dangerfield - sebdangerfield.me.uk
# http://www.sebdangerfield.me.uk/2011/03/automatically-creating-new-virtual-hosts-with-nginx-bash-script/
NGINX_CONFIG='/etc/nginx/sites-available'
NGINX_SITES_ENABLED='/etc/nginx/sites-enabled'
WEB_DIR='/var/www'
SED=`which sed`
CURRENT_DIR=`dirname $0`
if [ -z $1 ]; then
echo "No domain name given"
@desmondmorris
desmondmorris / gist:8139060
Created December 26, 2013 21:40
Drupal export for tumblr
SELECT
'text' as type,
'published' as state,
'off' as tweet,
FROM_UNIXTIME(n.created) as 'date',
'html' as format,
REPLACE(a.alias, 'blog/','') as slug,
n.title,
b.body_value as body
FROM node n
@desmondmorris
desmondmorris / wercker.yml
Last active December 20, 2015 06:49
Drupal 7 - Wercker configuration
box: wercker/php
services:
- wercker/mysql
build:
steps:
- script:
name: Install Drush
code: |-
pear channel-discover pear.drush.org
pear install drush/drush
@desmondmorris
desmondmorris / gist:5832414
Last active December 18, 2015 19:19
MongoDB NYC 2013 - Replica Sets

REPLICA SETS

HIDDEN - Reporting, Backup with out affecting the actual dataset

ROLES

Arbiter - low resource, voting member

// Highest priority always wins

@desmondmorris
desmondmorris / fuel.py
Created December 19, 2012 13:13 — forked from NorthIsUp/fuel.py
# blog post explaining all of this coming soon.
import requests
from pprint import pprint
try:
import simplejson as json
except ImportError:
import json
{
"name": "dezzme",
"subdomain": "dezzme",
"scripts": {
"start": "app.js"
},
"version": "0.0.0-17",
"engines": {
"node": "v0.6.x"
},
@desmondmorris
desmondmorris / gist:2902584
Created June 9, 2012 21:02
Card Bounce - Desmond, Steve, Sam
<html>
<head>
<title>Canvas example</title>
<style>
body {
margin:0;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>