Skip to content

Instantly share code, notes, and snippets.

Avatar

Sean Hamlin seanhamlin

View GitHub Profile
@cntlscrut
cntlscrut / aclcreate.php
Created Jun 15, 2018
Quick CSV to ACL declaration function
View aclcreate.php
<?php
/**
* Read in a CSV file as taken from the command line arg
* CSV file needs to be in the same directory as this
* script for the time being
*
* Output is expected to be text representing an ACL
* declaration that can be copypasta'd into a VCL file.
*
@bjornjohansen
bjornjohansen / sitemap-crawler.php
Last active Nov 17, 2020
Basic sitemap crawler to warm up a full page cache
View sitemap-crawler.php
#!/usr/bin/php
<?php
/**
* @license http://www.wtfpl.net/txt/copying/ WTFPL
*/
date_default_timezone_set( 'UTC' );
$sitemaps = array(
@kostajh
kostajh / setup.py
Last active Dec 31, 2015
Call with something like `python3 setup.py --username ACQUIA_CLOUD_USERNAME --password ACQUIA_CLOUD_PASSWORD --branch GIT_BRANCH`
View setup.py
#!/usr/bin/env python3
import subprocess
import json
import time
import sys
import argparse
baseurl = 'https://cloudapi.acquia.com/v1/sites/devcloud:MYSITE'
parser = argparse.ArgumentParser(description='Get username and password.')
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active Sep 21, 2021
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@CashWilliams
CashWilliams / fix_prefix.php
Created Jun 29, 2012
Drupal 7 drush script to remove database prefix
View fix_prefix.php
<?php
// current table prefix to be removed
$prefix = "drup_";
// echo generated statments rather then run them
$pretend = FALSE;
/////////////////////////////////////////////////////////////////////
$table_list = db_query("SHOW TABLES");