Skip to content

Instantly share code, notes, and snippets.

View kporangehat's full-sized avatar
🏠
Working from home

KP kporangehat

🏠
Working from home
View GitHub Profile
scp /some/path/client_dbs/com_shotgunstudio_someclient-pgsql-20121027-173252-v4.1.4-r37048.sql.gz shotgun@shotgun.vm:/home/shotgun/
ssh shotgun@shotgun.vm
cd shotgun_deploy
vi settings/vm_shotgun_client_test.rb
# edit the :repository line to match the version of code you want to deploy with this db.
# Usually it will match the current version of the db file, so in this case:
# set :repository, "https://svn.shotgunsoftware.com/tags/v4.1.4"
# save the file
@kporangehat
kporangehat / gist:3892785
Created October 15, 2012 14:34
Find all Tasks for 'myshot' that were created from TaskTemplate shot_pipeline_tt
shot_pipeline_tt = {'type': 'TaskTemplate', 'id':8}
myshot = {'type': 'Shot', 'id': 1680}
filters = [
['entity', 'is', myshot],
['template_task.Task.task_template', 'is', shot_pipeline_tt]
]
result = sg.find('Task', filters, ['content'])
shot_pipeline_tt = {'type': 'TaskTemplate', 'id':8}
shot_pipeline_tt_tasks = sg.find('Task', [['task_template', 'is', shot_pipeline_tt]])
print "%s Template Tasks" % len(shot_pipeline_tt_tasks)
@kporangehat
kporangehat / action_handler.py
Created August 4, 2012 01:23
Example: Handling Shotgun ActionMenuItem calls
#!/usr/bin/env python
# encoding: utf-8
# ---------------------------------------------------------------------------------------------
# Description
# ---------------------------------------------------------------------------------------------
"""
The values sent by the Action Menu Item are in the form of a GET request that is similar to the
format: myCoolProtocol://doSomethingCool?user_id=24&user_login=shotgun&title=All%20Versions&...