Skip to content

Instantly share code, notes, and snippets.

View toodooleedoo's full-sized avatar

Eric Soukenka toodooleedoo

View GitHub Profile
node_modules

Openvpn Safe start

This script accepts an openvpn file as an input parameter and will inject you're username and password into the ovpn file to allow login without having to type a password. Additionally you can configure a default ovpn file by naming the file default.ovpn.

It will also use iptables to ONLY allow connections to the IP in the .ovpn file. This prevents any leaks from a VPN drop as all other connections will not be allowed.

@toodooleedoo
toodooleedoo / README.md
Last active February 18, 2016 16:37
MP #AEM #NIX dispather cache cleaner

#MP #AEM #NIX dispather cache cleaner

Due to an issue where pages were being corrupted this was placed to search for incorrect HTML files in the dispatcher cache and cleanup as needed. Was a quick workaround.

@toodooleedoo
toodooleedoo / README.md
Last active October 19, 2017 00:26
#AEM #CQ Rotate Logs

#CQ #NIX Rotate Logs

Rotates AEM/CQ logs

#DATESTRING="20/Oct/2014";
REQUEST_LOG="request.log";
if [ -z "${DATESTRING}" ]; then
DATESTRING="`date '+%d/%h/%Y'`";
fi
for ((i=0;i<=9;i+=1)); do
printf "${DATESTRING} 0${i}: "
cat ${REQUEST_LOG} |grep -E "(ms)" |grep "<-" |grep "${DATESTRING}:0${i}" |sed -e 's/.*<-//g;s/.*-//g;s/ms//g;s/text\/html//g;s/.* //g' |awk "NR > 0 { s +=\$1 }; END {print s \" <- TIME TOTAL-> \" NR}" |awk '{print $1/$5}'

#Photo Organizer and backup utility

##Description Integrates photos taken from me and my wifes Androids to my Google Drive using some 3rd party tools. This allows me to integrate photos into my personal workflow which includes utter paranoia of losing my pictures :)

  • Snap Picture on an Android
  • Bittorrent sync places it on my linux box in ~/BTS/Androids/
  • Script does a find to look for any new photos via cron using linux find
  • If new photo is found sortphotos is triggered which examines EXIF data and moves to my master photo collection
@toodooleedoo
toodooleedoo / README.md
Last active August 29, 2015 14:22
#NODEJS #SHELL Convert Simplenote Notes to Laverna

#Convert a downloaded export from Simplenote and Import to Laverna

This is not very polished actually rather ugly. Was just used for a one time run however thought someone else would find this useful and maybe even convert it to NodeJS only and give it a little polish.

Don't plan on using unless your familiar with Linux and want to spend a little time.

Requires: NodeJS, Linux, Simplenote and Laverna Account Syncronized with Dropbox.

Instructions

  • From Simplenote select your name in the top right --> Download zip
@toodooleedoo
toodooleedoo / code.md
Last active August 29, 2015 14:22
#AEM #Sightly Errors found after 6.1 upgrade

6.1 initial install and testing so far shows it is much more strict on the Sightly Specs Comparison https://github.com/Adobe-Marketing-Cloud/sightly-spec/blob/master/SPECIFICATION.md#1142-comparison-operators

Will update this later to make it more clean only doing a quick POC at the moment from live code running on SP2.

#Invalid syntax for parameter

Runs in 6.0 errors in 6.1 note linkhandler is at https://gist.github.com/toodooleedoo/95e8108b81c2e00b9fea

  <div class="status">
    <a x-cq-linkchecker="skip" data-sly-use.attr="${'../linkhandler.js' @href=${inheritedPageProperties.redirectTarget}" data-sly-attribute="${attr.link}">
 ${properties.name}
@toodooleedoo
toodooleedoo / README.md
Last active February 18, 2016 16:47
#AEM #CQ #LINUX #CURL #NODEJS Bulk Content Importer

AEM CQ Bulk TSV Importer

While there is some use case specific logic this script takes a tab separated txt file which contains the AEM path, Node Property, and Node Value and updates accordingly.

##This more or less works but was abandoned.

@toodooleedoo
toodooleedoo / dashboard_report_apache_parser.sh
Last active August 29, 2015 14:14
#MP #LINUX Get report of types of dashboard reports accessed
USER=""
PASS=""
MW_HOST=""
MP_HOST=""
curl --dump-header headers.txt --silent "https://${MW_HOST}/siteminderagent/forms/login.fcc" -H "Host: ${MW_HOST}" -d "USER=${USER}" -d "target=http%3A%2F%2F${MP_HOST}%2Fpublish%2F" -d "PASSWORD=${PASS}" -o /dev/null