Skip to content

Instantly share code, notes, and snippets.

View kmplngj's full-sized avatar

Jan Kampling kmplngj

  • Münster, Germany
View GitHub Profile
@kmplngj
kmplngj / ganalytics-with-autotrack-german-legal.html
Created March 14, 2016 09:42
Add Google Analytics and Autotrack with anonymize IP and no Cookie Storage
var root = app.activeDocument;
var result = getStyleByString(root, "Formatgruppe 2:Form\\:atgruppe 1:Zeichen\\:\\:format 1", "characterStyles");
$.bp();
function getStyleByString(root, string, property) {
stringResult = string.match (/^(.*?[^\\]):(.*)$/);
var cStyleName = (stringResult) ? stringResult[1] : string;
cStyleName = cStyleName.replace (/\\:/g, ":");
remainingString = (stringResult) ? stringResult[2] : "";
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
#!/bin/sh
SWIFT=$(/usr/bin/env xcrun -f swift)
SCRIPTPATH=$1
COMPILEDPATH="$SCRIPTPATH.o"
SDKPATH=$(/usr/bin/env xcrun --show-sdk-path --sdk macosx)
#compile if necessary