Skip to content

Instantly share code, notes, and snippets.

View dpagini's full-sized avatar

David Pagini dpagini

View GitHub Profile
<?php
namespace Acquia\Blt\Custom\Commands;
use Acquia\Blt\Robo\BltTasks;
use Acquia\Blt\Robo\Exceptions\BltException;
/**
* Defines commands in the "tests" namespace.
*/
@dpagini
dpagini / clear_varnish.sh
Created September 21, 2017 19:19
Acquia cloud hook function to clear varnish cache.
#!/bin/bash
varnish_purge() {
echo "@INFO: Clear varnish cache starting"
for domain in `$drush_cmd ac-domain-list --format=print_r`; do
echo "@INFO: Clearing varnish cache for $domain"
$drush_cmd ac-domain-purge $domain
done
{
products: [
{
"name": "Voya Global Real Estate Fund",
"paceid": "5016",
"class": "A",
"cusip": "92913X845",
"ticker": "IGLAX",
"paceclassid": "1194"
},
@dpagini
dpagini / drupalvm-issues.md
Last active October 26, 2015 18:13
twitter reply to @geerlingguy

@geerlingguy - thanks again for asking. I thought I could put more content into a Gist to explain my difficulties.

So, first of all, I wasted a LOT of time thinking that my share was not being mounted, when it actually was. The output of my vagrant up w/o NFS enabled on Windows shows me that my synced_folder is being mapped correctly on the guest OS. When I enable NFS, and run vagrant up again, I am missing this same line. However, if I vagrant ssh into the box, I can see that the folder was in fact mounted correctly... Unfortunately I didn't TRY that until hours into troubleshooting.

My next issue was actually getting winnfsd to work on my computer. I dont know if you have seen this before, but I realized that the only way to get the nfs shared folder to work was to specify SOME mount_options in Windows. It seems that the mount command was failing over and over again when that variable is empty. I'm not even EXACTLY

@dpagini
dpagini / hs_analytics.html
Created July 30, 2015 14:31
Voya IM HubSpot tracking code
<!-- Start of Async HubSpot Analytics Code -->
<script type="text/javascript">
(function(d,s,i,r) {
if (d.getElementById(i)){return;}
var n=d.createElement(s),e=d.getElementsByTagName(s)[0];
n.id=i;n.src='//js.hs-analytics.net/analytics/'+(Math.ceil(new Date()/r)*r)+'/281782.js';
e.parentNode.insertBefore(n, e);
})(document,"script","hs-analytics",300000);
</script>
<!-- End of Async HubSpot Analytics Code -->