Skip to content

Instantly share code, notes, and snippets.

View jaygilmore's full-sized avatar
🕳️
🐇

Jay Gilmore jaygilmore

🕳️
🐇
View GitHub Profile
@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/
@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 / 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 / nginxrules.md
Created June 16, 2017 20:36
Nginx Rules
@jaygilmore
jaygilmore / text.class.php
Last active November 14, 2016 20:05 — forked from pepebe/new_gist_file.php
Fix fatal error "Fatal Error: Cannot redeclare class modTemplateVarInputRenderText..."
<?php
/*
Quick fix for this problem until I have the time to look for the cause.
"Fatal Error: Cannot redeclare class modTemplateVarInputRenderText...
...in core/model/modx/processors/element/tv/renders/mgr/input/text.class.php onl line 10"
*/
/**
* @package modx
@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 / Favicons.md
Last active June 9, 2016 21:31
Creating a favicon.ico from a set of hand adjusted PNGs on Mac

Creating Favicons

I didn't want to use scaled down images without adjusting the lower resolution images to be crisper and cleaner. Scaled images often yield crappy results. See this article by John Hicks for more info.

Tools

I am using png2ico installed via Homebrew.

Pre Conversion Optimization

Prior to running the conversion I ran the images through ImageOptim (there may be a better way to do this).

The Conversion

Tiny Content Framework

About the Project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Contribute

There’s more to come, and I’d love to hear what you think. Give me feedback on Twitter (@nicoleslaw) or by email (nicole@nicolefenton.com). We all benefit from sharing our ideas and creating standards. Onward.

Keybase proof

I hereby claim:

  • I am jaygilmore on github.
  • I am jaygilmore (https://keybase.io/jaygilmore) on keybase.
  • I have a public key whose fingerprint is 1CE9 4800 3A54 E380 F343 652B 98E5 58F5 31CE 298F

To claim this, I am signing this object:

@jaygilmore
jaygilmore / sectionNav.html
Created May 13, 2014 15:23
Nested getResources Calls from RTFM
[[getResources@section-nav? &parents=`[[+id]]` &level=`[[+level:add]]` &toPlaceholder=`childNav`]]
<li>
[[+childNav:notempty=`<i class="icon-caret-right"></i>`]]
<a href="[[~[[+id]]]]">[[+menutitle:default=`[[+pagetitle]]`]]</a>
[[+childNav]]
</li>