This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get project directory and git url | |
echo "Project code (used for project directory name):" | |
read project_code | |
echo "Project repo git url (can be blank):" | |
read project_git_url | |
# Clone DrupalVM | |
git clone [email protected]:geerlingguy/drupal-vm.git $project_code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script relies on jpegtran, a tool included with libjpeg. | |
# libjpeg comes bundled with ImageMagick on most nix platforms: | |
# | |
# Mac: | |
# brew install imagemagick | |
# brew install pngquant | |
# | |
# Ubuntu/Debian: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tqdm==4.19.5 | |
requests==2.18.4 | |
beautifulsoup4==4.6.0 | |
PyYAML==3.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: "2" | |
plugins: | |
duplication: | |
enabled: true | |
config: | |
languages: | |
php: | |
mass_threshold: 45 | |
eslint: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
window.onload = function () { | |
console.log(''+(+new Date)+': Onload fired'); | |
}; | |
document.onreadystatechange = function () { | |
console.log(''+(+new Date)+': Ready state changed'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name www.crozerkeystone.org | |
// @namespace https://www.crozerkeystone.org/ | |
// @version 0.1 | |
// @description Implements Acquia Lift | |
// @author Mike Monan | |
// @match *://www.crozerkeystone.org/* | |
// @grant none | |
// @xrequire https://code.jquery.com/jquery-latest.js | |
// @copyright 2017 acquia.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cheerio = require('cheerio') | |
const fetch = require('node-fetch') | |
// Main function to run. | |
async function main(url) { | |
// Fetch URL, log content | |
await fetch(url) | |
.then(resp => { | |
resp.text().then(body => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener('acquiaLiftContentAvailable', function(event) { | |
function unwrap(wrapper) { | |
// place childNodes in document fragment | |
var docFrag = document.createDocumentFragment(); | |
while (wrapper.firstChild) { | |
var child = wrapper.removeChild(wrapper.firstChild); | |
docFrag.appendChild(child); | |
} | |
// replace wrapper with document fragment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e # Abort if anything fails | |
echo "Checking current swap space..." | |
fin exec free -h | |
# Increase swap memory | |
echo "Creating 512M swap file..." | |
fin exec sudo dd if=/dev/zero of=/swapfile bs=1M count=512 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jQuery | |
(function($) { | |
$(document).ready(() => { | |
$.get("https://ipinfo.io/json").done((loc) => { | |
console.log(loc); | |
}); | |
}) | |
})(jQuery); | |
// Fetch (VanillaJS) |