Skip to content

Instantly share code, notes, and snippets.

View mickstevens's full-sized avatar

Mick Stevens mickstevens

View GitHub Profile
@schacon
schacon / better-git-branch.sh
Created January 13, 2024 18:41
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
<?php
// Set the numbers to call
$numbers = array("<number to call 1>", "<number to call 2>", "<number to call n>");
$number_index = isset($_REQUEST['number_index']) ? $_REQUEST['number_index'] : "0";
$DialCallStatus = isset($_REQUEST['DialCallStatus']) ? $_REQUEST['DialCallStatus'] : "";
header("content-type: text/xml");
// Check the status of the call and
@alexdunae
alexdunae / monit.conf
Created June 25, 2014 23:32
Get Monit notifications via SMS
check file nginx.pid with path /var/run/nginx.pid
if changed timestamp then exec "/usr/local/bin/monit2twilio" as uid root and gid root
<?php
// From http://ertw.com/blog/2013/11/05/using-an-ip-phone-with-twilio/
// Connect an incoming call to your SIP phone through Twilio
$called = preg_replace('/sip:1?(.*?)@.*/', '{$1}', $_POST['Called']);
header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
@natelandau
natelandau / .bash_profile
Last active May 20, 2024 08:41
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