Skip to content

Instantly share code, notes, and snippets.

@plamere
plamere / FetchTrackAndAnalysisData.js
Created April 9, 2012 09:39
Syncing Echo Nest analysis to Spotify playback
function fetchSongInfo(track) {
info('Getting song info for ' + track.name + ' by ' + track.artists[0].name);
var url = 'http://developer.echonest.com/api/v4/track/profile?api_key=N6E4NIOVYMTHNDM8J&callback=?';
var track_id = fromSpotify(track.uri);
$.getJSON(url, { id: track_id, format:'jsonp', bucket : 'audio_summary'}, function(data) {
if (checkResponse(data)) {
info("");
showTrackInfo(data.response.track);
fetchAnalysis(data.response.track);
@wikimatze
wikimatze / gist:9790374
Created March 26, 2014 18:43
Github Two-Factor Authentication Failed For HTTPS

I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.

Two-Factor Authentication

"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.

Enabling Two-Factor Authentication

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active March 26, 2024 11:27
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@magicznyleszek
magicznyleszek / css-selectors.md
Last active March 4, 2024 05:24
CSS Selectors Cheatsheet

CSS Selectors Cheatsheet

Hi! If you see an error or something is missing (like :focus-within for few years :P) please let me know ❤️

Element selectors

Element -- selects all h2 elements on the page

h2 {
import processing.video.*;
int imageCount = 22;
PImage[] file = new PImage[imageCount];
Movie clouds;
float cellsize = 18;
@eunicekokor
eunicekokor / getpop.py
Last active April 29, 2016 19:16
to get the populations of each nyc neighborhood
def get_population():
with open('population.json') as f:
contents = json.load(f)['data']
pop_dict = {}
for i,stuff in enumerate(contents):
if '2010' in contents[i]:
pop_dict[str(stuff[12])] = int(stuff[13])
return pop_dict