Skip to content

Instantly share code, notes, and snippets.

View victoriagrey's full-sized avatar

Victoria Grey victoriagrey

  • Nanaimo, BC, Canada
View GitHub Profile
1. The Red Gates - Fushimi Inari
https://goo.gl/maps/WSsa1ByskkC2
a. Get here early for an amazing hike + avoiding having other tourists in every shot...
b. Very much worth arriving at 6:15am'ish / sunrise...
c. Expect to take 2-3 hours exploring each of the Shrines.
d. When you get to a point where there's 3 choices on which way to go... go right...
- it's the least obvious, but correct.
- You'll know what I'm talking about when you've got a couple small unassuming buildings around you,
a map that doesn't make much sense, and a feeling in your stomach that you're going the wrong way.
@victoriagrey
victoriagrey / sg-active-users.py
Created December 5, 2016 02:09
Get the number of active users on your Shotgun site.
from shotgun_api3 import Shotgun
sg = Shotgun("SERVER_URL", "SCRIPT_NAME", "SCRIPT_KEY")
active_users = sg.find("HumanUser", [["sg_status_list","is","act"]])
print len(active_users)
@victoriagrey
victoriagrey / flask-sg-ami-data-dump.py
Last active November 28, 2018 23:49
Dumping out all the keys and values to a web server from a Shotgun Action Menu Item (AMI)
'''
When passing variables via Shotgun's action menu items,
sometimes you just need a server to test whether the
field data you want is correctly getting through.
-----
For more information and install instructions for Flask,
see : http://flask.pocoo.org/
'''
from flask import Flask, request
@victoriagrey
victoriagrey / report-app.py
Last active April 12, 2017 14:27
Flask Example Report App
# We'll need the Shotgun API to do queries on our server
from shotgun_api3 import Shotgun
# This is how we initialize our Flask Web Server.
from flask import Flask, request, render_template
app = Flask(__name__)
# Flask defines how we accept web requests into our program via
# the @app.route() method. In this case we're using a base path of "/",
# but you could add subdirectories. We also use the methods parameter,
from flask import Flask, request
app = Flask(__name__)
# The "Flask Web Server" defines how we accept data
# into our function via the @app.route() method. In this case
# we're using a base path of "/", but you could add subdirectories.
@app.route("/")
def index():
# For now, let's just get some text on the screen!
@victoriagrey
victoriagrey / flask-dump.py
Last active November 14, 2017 10:43
Flask Server w/ SSL enabled for testing GET & POST data
'''
When passing variables via Shotgun's custom URL handler &
action menu items, sometimes you just need a server to test
whether the field data you want is correctly getting through.
-----
If you're creating a custom URL handler or using modals, you'll need
to generate a self-signed certificate in the same directory as you place
this file.
@victoriagrey
victoriagrey / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console