Skip to content

Instantly share code, notes, and snippets.

Ian Lintner ianlintner-wf

Block or report user

Report or block ianlintner-wf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ianlintner-wf / redis_cache_clear_phpsimplesaml.php
Created Apr 2, 2019
Redis custom cache for simple saml cache clear all
View redis_cache_clear_phpsimplesaml.php
$config = \SimpleSAML_Configuration::getInstance();
$red = new \SimpleSAML\Store\Redis();
$conf = array(
'host' => $config->getString('', 'localhost'),
'port' => $config->getInteger('store.redis.port', 6379),
'prefix' => $config->getString('store.redis.prefix', 'SimpleSAMLphp'),
'scheme' => 'tcp',
ianlintner-wf / cordova-google-services-version-gradle-fix.js
Last active Feb 19, 2019
This is to fix version issues between multiple google services plugins in Ionic & cordova builds. Cordova before_prepare hook.
View cordova-google-services-version-gradle-fix.js
#!/usr/bin/env node
// Define hook in your config <hook src="scripts/cordova-google-services-version-gradle-fix.js" type="before_prepare" />
var sourceDir = '';
var platformDir = 'platforms/android';
var fs = require('fs');
var path = require('path');
var readline = require("readline");
ianlintner-wf / docker.aliases.drushrc.php
Last active Mar 9, 2017
Docker & Drupal Local Alias via seperate dockerized SSH Container
View docker.aliases.drushrc.php
$aliases['loc'] = array (
// This is the full site alias name from which we inherit its config.
'parent' => '@docker.loc' //alias name,
'uri' => 'docker.loc' //Drupal URL,
'root' => '/var/www/' //Drupal full path on disk,
'ssh-options' => '-p 2222',
'remote-host' => '' //DOCKER/DOCKER MACHINE IP,
ianlintner-wf /
Created Mar 7, 2017
Simple Varnish Test Via Curl
#$1 is url
#$2 is cookie file
curl -I -b $2 -c $2 $1 > /tmp/vtest
echo 'Varnish Enabled: '
grep -i 'Via.?varnish' < /tmp/vtest
echo 'Varnish Hit: '
grep -i 'X-Cache:.HIT' < /tmp/vtest
ianlintner-wf /
Last active Jan 31, 2017
Drush Migrate a Drupal Site Variable Between Sites in JSON. #Drush #vget #vset #json #pipe #Drupal #export #import
# Drush script to port specific variables. Can be used with other bash scripts for looping/migration.
# This is a first version and could be cleaned up and use ENVs
# $1 source site alias
# $2 target site alias
# $3 variable name
# drush @alias.source vget --format=json --exact custom_module_variable | drush vset --format=json --exact custom_module_variable -
# Remeber there is a "-" at the end of the vset command!
drush $1 vget --format=json --exact $3 | drush $2 vset --format=json --exact $3 -
ianlintner-wf / utility_xmlsitemap.php
Last active Nov 11, 2016
Drupal 7 XMLSitemap Module: Create a Sitemap for a language programmatically.
View utility_xmlsitemap.php
* Create a site map for a specific language.
* @param string $language
* Language code.
* @return bool
* Success bool.
function utility_xmlsitemap_create_sitemap($language) {
#Fixes issues with Bluetooth audio stuttering/quality.
sudo defaults write "Apple Bitpool Min (editable)" 53
ianlintner-wf /
Last active Feb 23, 2017
PHP Code Sniffer / CI / Bamboo / Jenkins / Drupal / Check Style script
# PHP CodeSniffer CI Task
# Based off of git pre-commit hook
# Export Variables to be set by CI Agent / Bot
# PHPCS_BIN=/usr/bin/phpcs
ianlintner-wf /
Last active Sep 13, 2016
Drupal Local Development Tools/Scripts/Notes

This is a collection of files, scripts and tips to get local development up and running.

Import a database via drush.

drush sql-drop
drush sql-cli < /mnt/db/backup.sql

Export a database via drush

git checkout master
if ! git diff-files --quiet --ignore-submodules
echo "there are changes in the working tree exiting..."
exit 1
git pull origin
git pull origin --tags
git tag -a "$tag" -m "deploy tag $tag"
You can’t perform that action at this time.