Skip to content

Instantly share code, notes, and snippets.

View athaller's full-sized avatar
💭
Making Magic

athaller

💭
Making Magic
  • $date :: PHP :: Systems :: Dev Ops
  • East :: Web
View GitHub Profile
---
- name: Spins up an ELK Stack Docker environment
hosts: all
sudo: true
vars:
roles:
tasks:
- name: Spin up Elasticsearch
docker:
name: elasticsearch
@fbrnc
fbrnc / file2cfn.php
Created October 31, 2015 05:07
CloudFormation File Helper
<?php
echo '{"Fn::Base64": {"Fn::Join": ["\n", ' . json_encode(file($argv[1], FILE_IGNORE_NEW_LINES), JSON_PRETTY_PRINT) . ']}}';
@aaronbauman
aaronbauman / p-connect.sh
Last active June 10, 2020 09:28
Connect to a Pantheon database in Sequel Pro
#!/bin/sh
# exit on any errors:
set -e
if [ $# -lt 1 ]
then
echo "Usage: $0 @pantheon-alias"
exit 1
fi
@mig5
mig5 / qubes-template-update.sh
Last active July 18, 2018 12:04
qubes-template-update
#!/bin/bash
#
# Script to update template images in a big batch
#
# Get a list of templates
TEMPLATES=$(qvm-ls | grep Tpl | awk {'print $1'} |cut -d[ -f2 | cut -d] -f1)
usage()
{
@SebCorbin
SebCorbin / block.tpl.twig
Last active July 8, 2021 09:50
Drupal Bootstrap theme main templates converted to Twig
<section id="{{ block_html_id }}" class="{{ classes }} clearfix"{{ attributes }}>
{{ title_prefix }}
{% if title %}
<h2{{ title_attributes }}>{{ title }}</h2>
{% endif %}
{{ title_suffix }}
{{ content }}
</section>
@matschaffer
matschaffer / gist:4912279e49dce41ab9b2
Last active July 6, 2021 13:05
Bash-friendly ec2 prices
#!/usr/bin/env bash
URL="http://a0.awsstatic.com/pricing/1/ec2/ri-v2/linux-unix-shared.min.js"
(echo 'function callback(data) { console.log(JSON.stringify(data)); }'; curl -s "$URL") |\
node |\
jq -r '.config.regions[] |
select(.region == "us-east-1") |
.instanceTypes[] |
[
@butlerblog
butlerblog / return_mirror_sender.php
Last active November 22, 2021 22:58
Set the mail return path to mirror the sender in #wp_mail to reduce likelihood of spam rejection
add_action( 'phpmailer_init', 'fix_my_email_return_path' );
function fix_my_email_return_path( $phpmailer ) {
$phpmailer->Sender = $phpmailer->From;
}
@barryvdh
barryvdh / .phpstorm.meta.php
Last active February 10, 2025 15:07
Laravel PhpStorm Meta file
<?php
namespace PHPSTORM_META {
/**
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
* Generated on 2017-09-28.
*
* @author Barry vd. Heuvel <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
@chrisfree
chrisfree / gist:6affb7517f67586d721a
Created February 9, 2015 15:44
Example Playbook
---
- hosts: Chromatic-Demo-1
gather_facts: true
roles:
- base-os
- new-user
- apache2
- php55
- drush
- redis-server
@soarez
soarez / deploy.bash
Last active September 23, 2019 16:15
#!/bin/bash
function deploy {
# Update the rsync target on the server
rsync \
-av \
--delete \
--delete-excluded \
$rsync_ignore_list_param \
$rsync_source/ $target:$rsync_target