Skip to content

Instantly share code, notes, and snippets.

View jaygilmore's full-sized avatar
🕳️
🐇

Jay Gilmore jaygilmore

🕳️
🐇
View GitHub Profile
@jaygilmore
jaygilmore / recalculateURIs.php
Created October 25, 2017 19:41 — forked from opengeek/recalculateURIs.php
Script to recalculate all unfrozen URI values for MODX Resources in 2.1.x+
<?php
include 'config.core.php';
include MODX_CORE_PATH . 'model/modx/modx.class.php';
$modx = new modX();
$modx->setLogTarget(XPDO_CLI_MODE ? 'ECHO' : 'HTML');
$modx->initialize('mgr');
$modx->setLogLevel(modX::LOG_LEVEL_INFO);
@jaygilmore
jaygilmore / Rsync.MD
Created May 9, 2018 19:48
Rsync from source into Cloud from another server

Logged into Cloud and Rsync from another location into Cloud. Note the Port command if needed.

rsync -azvvP -e  user@192.168.2.1:/var/www/ /www --filter=". filter.txt"

With the SSH command for the port if needed.

rsync -azvvP -e 'ssh -p 2801' user@192.168.2.1:/var/www/ /www --filter=". filter.txt"
@jaygilmore
jaygilmore / shortlog.md
Last active September 26, 2019 16:13
A way to get a list of the committers from the last release to the most recent with the number of commits.

Git Contributors List Method

Replace the versions with the previous first and current second after the ....

git shortlog -s -n v2.7.1-pl...v2.7.7-pl
@jaygilmore
jaygilmore / bento-segment.js
Last active September 29, 2023 16:51
Bento Segment Function
// Learn more about destination functions API at
// https://segment.com/docs/connections/destinations/destination-functions
/**
* Handle track event
* @param {SegmentTrackEvent} event
* @param {FunctionSettings} settings
*/
async function onTrack(event, settings) {
// Learn more at https://segment.com/docs/connections/spec/track/