This file contains hidden or 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
# LEMP Provisioning Script | |
# - Script generated by Laravel Forge on 20200426 | |
# - Built for Ubuntu 18.04LTS, PHP7.2, MySQL5.7 | |
# Variables | |
#------------------------------------------------------------------------------- | |
my_hostname="" # mydomain | |
my_username="" # myuser | |
my_root_pw="" # **************** | |
my_sshkey="" # ssh-rsa AAAA... |
This file contains hidden or 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
/** | |
* Pacer | |
* Iterate over an array and process each item in a promise with a given delay. | |
* Ideal if you need to run items at a set or variable pace. As used in | |
* https://github.com/cballenar/propertygrubber to delay items due to timeouts | |
* possibly put in place to stop crawlers. | |
* | |
* @param {Array} list List of items to process | |
* @param {Number} delay Time in milliseconds to delay each item | |
* @returns {Array} New list of processed items |
This file contains hidden or 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
"Drupal IFFE": { | |
"prefix": "drif", | |
"body": [ | |
"/**", | |
"* @name ${1:ScriptName}", | |
"* @description ${2:Script description.}", | |
"* @param {string} input", | |
"* @returns {string} output", | |
"*/", | |
"(function ($, window, Drupal) {", |
This file contains hidden or 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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Image Ratios Comparisons</title> | |
</head> | |
<body> | |
<div id ="app" class="container"></div> | |
</body> |
This file contains hidden or 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
/** | |
* Toggle Summary Message. | |
* Changes the content of a details' summary to indicate whether clicking it | |
* will open or close it. Assumes the <summary> lies directly under the | |
* <details> tag and contains `data-message-open` and `data-message-close` | |
* attributes with the respective values for each case. | |
* | |
* @param {Event} event | |
*/ | |
function toggleSummaryMessage(event) { |
This file contains hidden or 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 | |
namespace yournamespace\yourplugin; | |
use Craft; | |
class MyClass | |
{ | |
/** | |
* Basic Logging implementation |
This file contains hidden or 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
""" | |
Copy Files Based on Lists of Source and Target Locations | |
A script to move files from their respective source location (s) to the desired | |
target location (t). Where each s and t locations are stored as separate lists | |
of paths, each in a separate line, in text files, sources.txt and targets.txt respectively | |
""" | |
import os | |
import shutil | |
# let's make sure we log everything that happens here |
This file contains hidden or 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 | |
/** | |
* @file | |
* Contains webform_auto_paths.module. | |
* | |
* Set a Drupal's Webform paths automatically based on the title. This improves | |
* the default use of the machine name (32 chars max) which can result in | |
* cropped or enumerated form URLs if the title is too long. | |
* |
OlderNewer