Skip to content

Instantly share code, notes, and snippets.

View willtonkin's full-sized avatar
💭
I may be slow to respond.

Will Tonkin willtonkin

💭
I may be slow to respond.
View GitHub Profile
@willtonkin
willtonkin / vimdiff.md
Created January 14, 2020 08:10 — forked from mattratleph/vimdiff.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@willtonkin
willtonkin / aem-render-timings.sh
Created May 15, 2018 09:43
get AEM component render timings on author
#!/bin/bash
RAND="$RANDOM"
server="http://localhost:4502"
#workingPath="/content/wel-demo"
#relPath="/en"
workingPath="/content/ewp-marketing-websites/thomsonreuters/gl/en/about-us"
relPath="/executive-team"
@willtonkin
willtonkin / jcr-paths-permissioning.md
Created November 9, 2017 16:32
AEM JCR path notes and permissioning

JCR Root Paths

  • /libs holds predefined system functionality
  • /apps application specific
  • /etc a dumpsterfire
  • /tmp

User Permissioning

Author instance

@willtonkin
willtonkin / no-frills-social-sharing-urls.md
Last active September 25, 2017 14:47 — forked from mikedidthis/no-frills-social-sharing-urls.md
No Frills Social Sharing URLs

No Frills Social Sharing URLs

Not a huge fan of share buttons in general, but people seem to like them. Below is a list of social networks and their respective, good ol' fashion, URLs for sharing content.

[TITLE] indicates where to add your own title, url, description etc. Do not include the square brackets.

Feel free to add / update them, either in the comments or a fork.

Facebook
{
"Working Directory" : "\/Users\/willtonkin",
"Prompt Before Closing 2" : 0,
"Selected Text Color" : {
"Green Component" : 0.7714409,
"Blue Component" : 0.7099305,
"Red Component" : 0.7696096
},
"Rows" : 25,
"Ansi 11 Color" : {
@willtonkin
willtonkin / Vagrantfile
Last active March 2, 2017 12:11 — forked from jbalzar/Vagrantfile.rb
Set scotchbox default document root to /var/www
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.hostname = "scotchbox"
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
@willtonkin
willtonkin / aem-debug
Created December 7, 2016 10:47 — forked from gabrielwalt/aem-debug
Run AEM in debug mode
java -jar cq-quickstart-6.0.0.jar -debug 10123
git clone --mirror https://bitbucket.org/exampleuser/repository-to-mirror.git
# Make a bare mirrored clone of the repository
cd repository-to-mirror.git
git remote set-url --push origin https://github.com/exampleuser/mirrored
# Set the push location to your mirror
git push --mirror
@willtonkin
willtonkin / disable-target.js
Created August 18, 2016 11:17
Clientlib to disable Adobe Target dialog in Classic AEM authoring
CQ.Ext.ns("MyClientLib");
MyClientLib.EditRollover = CQ.Ext.extend(CQ.wcm.EditRollover, {
handleContextMenu: function(e){
MyClientLib.EditRollover.superclass.handleContextMenu.call(this, e);
var component = this.element.linkedEditComponent;
if (!component || !component.menuComponent) {
return;