Skip to content

Instantly share code, notes, and snippets.

View TMG-MattNewman's full-sized avatar

Matt Newman TMG-MattNewman

View GitHub Profile
curl -u admin:admin http://localhost:4502/crx/packmgr/service.jsp\?cmd\=ls | grep -o "pack_[a-z0-9\-]*" > aem-packages-to-delete.txt
while read line; do curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/temporary/$line.zip\?cmd\=delete ; done < aem-packages-to-delete.txt
find src -name '*.js' ! -type d -exec bash -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \;
var removeParam = () => {};
var addParam = () => {};
var thing = { toggle: { checked: true } };
var domNodesCount = 20;
var functionOne = () => {
let listTitle = '';
for (let i=domNodesCount; i>0; i--) {
if( thing.toggle.checked ) {
alias ll='ls -FGlAhp' # Preferred 'ls' implementation
alias edit='idea' # edit: Opens any file in sublime editor
alias f='open -a Finder ./' # f: Opens current directory in MacOS Finder
alias o=f
alias lista="list_aliases"
alias showa="list_aliases"
alias qfind="find . -name " # qfind: Quickly search for file
alias memHogsTop='top -l 1 -o rsize | head -20'
alias memHogsPs='ps wwaxm -o pid,stat,vsize,rss,time,command | head -10'
alias cpu_hogs='ps wwaxr -o pid,stat,%cpu,time,command | head -10'
alias.co=checkout
alias.ci=commit
alias.st=status
alias.br=branch
alias.hist=log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short
alias.type=cat-file -t
alias.dump=cat-file -p
alias.info=log --name-status
alias.recent=!f() { git branch --sort=committerdate --format="%(committerdate:relative)%09%(refname:short)" | tail -n ${1:-10}; }; f
alias.aliases=!sh -c 'git config --list | grep alias'