Skip to content

Instantly share code, notes, and snippets.

View xthesaintx's full-sized avatar

Stephen Garrett xthesaintx

View GitHub Profile
@xthesaintx
xthesaintx / playlists.py
Last active November 18, 2021 23:20
Makes a copy of Spotify's Discover Weekly or Release Radar depending on day of week [M-Th = DW / F-Su = RR] and names it [DW/RR] - [YEAR] - [WEEK]
#!/usr/bin/env python3
import spotipy
import datetime
import pprint
from spotipy.oauth2 import SpotifyOAuth
# CHECKS IF PLAYLIST EXSISTS
def does_playlist_exist(u,s,pl):
x = s.user_playlists(u)
for x in x['items']:
@xthesaintx
xthesaintx / JobFolders.command
Last active April 5, 2020 23:50
Creates X number of Job Folders and Sub Folders, checks to see if the job number is in use and other validation. Allows to output the folders as a csv split by job number and name.
#!/usr/bin/env python3
import sys
import getopt
import os
import re
import csv
###---HOUSEKEEPING---###
#define home dir
@xthesaintx
xthesaintx / DropShadow - Animate CC
Created October 18, 2018 01:57
Drop-Shadow Action Script (Global) Animate CC
// Global
function newShadow (ob)
{
ob.shadow = new createjs.Shadow("rgba(0,0,0,.3)",1,1,10);
}
//The object needs to be a Symbol -> Movie Clip
//It needs to be named on the timeline
//Drop shadow will appear when script is implemented on the timeline
//
@xthesaintx
xthesaintx / ActionScript.js
Last active September 3, 2018 21:18
Dynamic typewriter effect for AdobeAnimate CC
//Global Script
var txt = new Array();
var x = 2; //speed multiplier
var count = 0;
var ti = 0;
txt[0] = "";
txt[1] = "FAST TRACK YOUR CAREER IN\nPOLITICS OR GOVERNMENT"; //51
txt[2] = "Study for a Master of Philosophy,\nPolitics and Economics at\nVictoria University in 2019.";//90
@xthesaintx
xthesaintx / export_png.jsx
Created August 19, 2018 23:10
Export all items in INDESIGN file as individual PNG files
// Set resolution options
var rp = [72,150,300];
// Set EXPORT presets
app.pngExportPreferences.exportResolution = 72;
app.pngExportPreferences.antiAlias = true;
app.pngExportPreferences.pngQuality = PNGQualityEnum.MAXIMUM;
app.pngExportPreferences.pngColorSpace = PNGColorSpaceEnum.RGB;
app.pngExportPreferences.pngExportRange = PNGExportRangeEnum.EXPORT_RANGE;