Skip to content

Instantly share code, notes, and snippets.

View cleblond's full-sized avatar

Carl LeBlond cleblond

View GitHub Profile
@cleblond
cleblond / gist:867202c1e1a5d9543967426dc447d2b1
Created January 3, 2021 14:20 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@cleblond
cleblond / elb.sh
Created August 21, 2020 17:00 — forked from dustincurrie/elb.sh
Run a command on all instances attached to an AWS ELB
#!/bin/bash
# Runs a command on all instances attached to a load balancer
# Elastic Load Balancer Tools from http://aws.amazon.com/developertools/2536
ELB=prod-axs-aeg
COMMAND='service varnish restart'
INSTANCES=$(elb-describe-instance-health $ELB | awk -F " " '{print $2}')
See the entry point in file "blti-launch.html".
@cleblond
cleblond / export_csv.php
Created August 30, 2017 17:17 — forked from janschoepke/export_csv.php
MySQL CSV Export via PHP (PHP7 ready)
<?php
/* vars for export */
// database record to be exported
$db_record = 'XXX_TABLE_NAME_XXX';
// optional where query
$where = 'WHERE 1 ORDER BY 1';
// filename for export
$csv_filename = 'db_export_'.$db_record.'_'.date('Y-m-d').'.csv';
// database variables
@cleblond
cleblond / blti-launch.php
Created December 24, 2016 13:02 — forked from matthanger/blti-launch.php
Sample code for Basic LTI Consumer in PHP
<?php
# ------------------------------
# START CONFIGURATION SECTION
#
$launch_url = "http://www.imsglobal.org/developers/BLTI/tool.php";
$key = "12345";
$secret = "secret";
$launch_data = array(