Skip to content

Instantly share code, notes, and snippets.


Jack James surrealroad

View GitHub Profile
surrealroad /
Created Oct 30, 2019
Update Shotgun field descriptions from a CSV
#!/usr/bin/env python
# encoding: utf-8
Import field descriptions from CSV file
Created by Jack James on 2019-10-30.
Copyright (c) 2019 Autodesk. All rights reserved.
surrealroad /
Created Jun 22, 2017
Shotgun API script to facilitate Version creation from folder of files
#!/usr/bin/env python
# encoding: utf-8
Create Versions in Shotgun from a folder of local files
Create a new version with the name based on the filename
Transcode the file and generate thumbnails and web-playable media
surrealroad /
Last active Dec 12, 2016
Given a directory of zip files, loop through each file and extract a jpeg within the zip called {zipname}/{zipname}.jpg
cd $SRC;
find . -name '*.zip' -exec sh -c 'unzip -j "{}" `basename {} .zip`/`basename {} .zip`.jpg -d "`dirname \"{}\"`"' ';'
surrealroad / import-js.scpt
Created Dec 5, 2016
JXA Scriptlet to allow importing .js files in the same folder
View import-js.scpt
var app = Application.currentApplication()
app.includeStandardAdditions = true
var path = app.pathTo(this);
var workflowFolder = $.NSString.alloc.initWithUTF8String(path).stringByDeletingLastPathComponent.js + '/';
surrealroad / showquery.php
Created Aug 10, 2015
dump wordpress query
View showquery.php
echo "<pre>"; print_r($wp_query->query_vars); echo "</pre>";
surrealroad / find_fields_in_pages.rb
Last active Nov 23, 2015
Shotgun: find all pages a field is used on (Courtesy pboucher)
View find_fields_in_pages.rb
Find pages a field is used on
1. Edit the last line in the following script to reference the
appropriate field & entity
2. Paste the whole thing into the Ruby console for the site in
surrealroad / Convert Avid Batch file
Last active Aug 29, 2015
Convert Avid batch newlines to Mac/Unix-friendly ones
View Convert Avid Batch file
# using sed
sed $'s/\\\r/\\\n/g' $FILE
# using tr
tr "\r" "\n" < "$FILE"
surrealroad /
Last active Aug 29, 2015
Reformat Plex package for atom synology
mkdir PlexMediaServer-
cd PlexMediaServer-
tar xvzf ../PlexMediaServer-
perl -pi -e 's/evansport/evansport avoton/g' INFO
tar -zcvf ../PlexMediaServer- *
surrealroad / Duplicate files & folders without content
Last active Aug 29, 2015
Duplicate files & folders without content
View Duplicate files & folders without content
# If there are only directories and regular files, you can do something like this:
cd "$src"
find . -type d -print0 | ( cd "$dst" ; xargs -0 mkdir -p )
find . -type f -print0 | ( cd "$dst" ; xargs -0 touch )
surrealroad / FCP7XML_queries
Created Jun 23, 2014
XPath Queries for Final Cut Pro 7 XML files
View FCP7XML_queries
// clips
// shot-take
"//clip[" & $clipIndex & "]/logginginfo/shottake"
// scene
"//clip[" & $clipIndex & "]/logginginfo/scene"
// default angle