Skip to content

Instantly share code, notes, and snippets.

View ethangardner's full-sized avatar

Ethan Gardner ethangardner

View GitHub Profile
@ethangardner
ethangardner / fix-wordpress-permissions.sh
Created February 8, 2018 15:51 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@ethangardner
ethangardner / facebook_leads.md
Last active April 4, 2018 21:28 — forked from tixastronauta/facebook_leads.md
Receiving Facebook Leads on a Webhook

Receiving Facebook Leads on a Webhook

1 - Create an App

Head over to developer.facebook.com and create an App

2 - Setup the webhook

On your server, create a facebook webhook that will handle facebook calls. Then create a "leadgen" webhook on you App: https://developers.facebook.com/docs/graph-api/webhooks/v2.11

@ethangardner
ethangardner / gist:1587281
Created January 10, 2012 05:52 — forked from wrboyce/gist:786460
pre-commit hook to automatically minify javascript/css
#!/usr/bin/zsh
COMPRESSOR=$(whence -p yui-compressor)
[ -z $COMPRESSOR ] && exit 0;
function _compress {
local fname=$1:t
local dest_path=$1:h
local min_fname="$dest_path/${fname:r}.min.${fname:e}"
$COMPRESSOR $1 > $min_fname
@ethangardner
ethangardner / yql_flickr.php
Created December 21, 2010 02:02 — forked from avinashbangar/yql_flickr.php
using yql to access flickr photos via api
<!-->
Following code gets information about photos from Flickr via YQL for the given search term
Author : avinash
Email : [email protected]
<-->
<h2>Using YQL to Access the Flickr API</h2>
<form name='upcoming_form'>