Skip to content

Instantly share code, notes, and snippets.

Peter Liu pll33

View GitHub Profile
@pll33
pll33 / log_spotify_playlist_web.js
Last active May 14, 2018
Javascript: Spotify playlist information to console log output
View log_spotify_playlist_web.js
// output: Artist Name(s) - Track Title - Album Name
let trackTitleNodes = document.querySelectorAll('.track-name-wrapper span.tracklist-name');
let artistAlbumNodes = document.querySelectorAll('.track-name-wrapper span.second-line');
// dash-separated playlist
let outputText = ``;
let artistAlbumSplit = '';
outputText += `Artist - Title - Album\n`;
for (let i = 0; i < trackTitleNodes.length; i++) {
@pll33
pll33 / state_abbreviations_array.txt
Created Apr 14, 2017
US states in Array form (JS/Python)
View state_abbreviations_array.txt
['AL','AK','AR','AZ','CA','CO','CT','DE','FL','GA','HI','IA','ID','IL','IN','KS','KY','LA','MA','MD','ME','MI','MN','MO','MS','MT','NC','ND','NE','NH','NJ','NM','NV','NY','OH','OK','OR','PA','RI','SC','SD','TN','TX','UT','VA','VT','WA','WI','WV','WY']
@pll33
pll33 / openstates_abbreviations_array.txt
Last active Mar 20, 2017
US state and territory abbreviations for use with OpenStates in Array form (JS/Python)
View openstates_abbreviations_array.txt
['AK','AL','AR','AZ','CA','CO','CT','DC','DE','FL','GA','HI','IA','ID','IL','IN','KS','KY','LA','MA','MD','ME','MI','MN','MO','MS','MT','NC','ND','NE','NH','NJ','NM','NV','NY','OH','OK','OR','PA','PR','RI','SC','SD','TN','TX','UT','VA','VT','WA','WI','WV','WY']
@pll33
pll33 / states_territories_abbreviations_array.txt
Last active Mar 20, 2017
US states and territories in Array form (JS/Python)
View states_territories_abbreviations_array.txt
['AK','AL','AR','AS','AZ','CA','CO','CT','DC','DE','FL','FM','GA','GU','HI','IA','ID','IL','IN','KS','KY','LA','MA','MD','ME','MH','MI','MN','MO','MS','MT','NC','ND','NE','NH','NJ','NM','NV','NY','MP','OH','OK','OR','PA','PR','PW','RI','SC','SD','TN','TX','UT','VA','VI','VT','WA','WI','WV','WY']
You can’t perform that action at this time.