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
<!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
#!/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 git@github.com: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
#!/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) |
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
// Load JS function | |
var loadJS = function(url, callback){ | |
var scriptTag = document.createElement('script'); | |
scriptTag.src = url; | |
scriptTag.onload = callback; | |
scriptTag.onreadystatechange = callback; | |
document.body.appendChild(scriptTag); | |
}; | |
// Load CSS function |
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
<?php | |
$xml=simplexml_load_file("sitemap.xml") or die("Error: Cannot create object"); | |
$storage = []; | |
$xmltxt = fopen("xml.txt", "w"); | |
$count = $skipped = 0; | |
// Normalize and remove duplicates. | |
foreach ($xml as $sxe) { | |
$count++; | |
$loc = strtolower($sxe->loc); |
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
input="goaccess.log" | |
output="goaccess.html" | |
touch $input | |
for var in "$@" | |
do | |
cat $var >> $input | |
done | |
goaccess $input -o $output --log-format=COMBINED |