Skip to content

Instantly share code, notes, and snippets.

View lucanos's full-sized avatar

Luke Stevenson lucanos

View GitHub Profile
@jmadden
jmadden / forward_to_first_number.xml
Last active September 1, 2022 22:28
TwiML Incoming Calls - Forward call to numbers in order. Fire off VMail and send SMS on no answer
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<!-- Forward to first number and if no answer, action URL points to second number to try -->
<Dial timeout="15" action="forward_to_second_number.xml">
<Number url="whisper_instructions.xml">+15554441212</Number>
</Dial>
</Response>
@matt448
matt448 / hx711_calibration.ino
Last active March 13, 2023 16:56
HX711 Calibration for Arduino
/*
Started with example code written by Nathan Seidle from SparkFun Electronics and added
LCD output with gram and ounce values.
Setup your scale and start the sketch WITHOUT a weight on the scale
Once readings are displayed place the weight on the scale
Press +/- or a/z to adjust the calibration_factor until the output readings match the known weight
Arduino pin 6 -> HX711 CLK
Arduino pin 5 -> HX711 DOUT
@ericandrewlewis
ericandrewlewis / gist:95239573dc97c0e86714
Last active December 12, 2023 09:52
Setting up a WordPress site on AWS

Setting up a WordPress site on AWS

This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.

This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.

If you experience any difficulties or have any feedback, leave a comment. 🐬

Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.

@mackensen
mackensen / gulpfile.js
Created October 21, 2014 15:35
This is an example gulpfile for managing a WordPress theme with a custom (non-LESS) CSS stylesheet. It includes tools for bumping the version and updating the version references.
// List of modules used.
var gulp = require('gulp'),
bump = require('gulp-bump'), // Generates new version.
argv = require('yargs')
.default('release', 'patch')
.argv, // CLI parser.
fs = require('fs'), // Used by bump.
semver = require('semver'), // Used by bump.
git = require('gulp-git'), // Git wrapper.
jshint = require('gulp-jshint'), // Lints JS.
@hofmannsven
hofmannsven / README.md
Last active April 7, 2024 09:28
Git CLI Cheatsheet
@rusln
rusln / gist:6021413
Created July 17, 2013 15:05
Simple RBAC implementation, see comments for details.
<?php
/**
* Role Based Access Control :
* @link http://phpmaster.com/role-based-access-control-in-php/ Een uitgebrenamee versie van ACL
* Role Based Access List: de sql queries die in deze tutorial
* worden gebruikt zijn te ingewikkeld, 1 join voor 3 tabels ?
* Daarom heb ik een veel simpelere oplossing die minder elegant is maar
* veel dunameelijker.
*
@randomecho
randomecho / australian-postcodes.sql
Last active April 11, 2024 12:08
Australian postcodes (with states and suburb names) geocoded with latitude and longitude.
/*
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod
May contain errors where latitude and longitude are off. Use at own non-validated risk.
*/
SET NAMES utf8;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS postcodes_geo;
@tagroup
tagroup / RainWaterOutputLogger.pde
Created January 20, 2013 23:23
Arduino Sketch for data logging water flow to an SD card. Project at http://thomasloughlin.com/rain-water-collection/.
#include <SD.h>
/*
This script is a simple combination of two existing example files.
The goal is to measure water flow coming from a rain collection barrel
The project progress can be found at http://thomasloughlin.com/rain-water-collection/.
*/
/**********************************************************
This is example code for using the Adafruit liquid flow meters.
@xcommerce-gists
xcommerce-gists / rest_test.php
Created November 20, 2012 02:02
Magento coupon code generator test script
<?php
/********************************************************************
File name: rest_test.php
Description:
A PHP test script that calls the Coupon AutoGen extension
to Magento's REST API.
The Coupon AutoGen API takes:
-- the rule ID of the &quot;Generate Coupons&quot; rule to execute
-- the number of coupon codes to generate
-- the length of each coupon code