Skip to content

Instantly share code, notes, and snippets.

@eunicekokor
eunicekokor / getpop.py
Last active Apr 29, 2016
to get the populations of each nyc neighborhood
View getpop.py
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
View gist:415cd41ba45fd29cfe80
import processing.video.*;
int imageCount = 22;
PImage[] file = new PImage[imageCount];
Movie clouds;
float cellsize = 18;
@magicznyleszek
magicznyleszek / css-selectors.md
Last active Apr 26, 2021
CSS Selectors Cheatsheet
View css-selectors.md

CSS Selectors Cheatsheet

Element selectors

Element -- selects all h2 elements on the page

h2 {
    foo: bar;
@TSiege
TSiege / The Technical Interview Cheat Sheet.md
Last active May 6, 2021
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.
View The Technical Interview Cheat Sheet.md

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!






\

@wikimatze
wikimatze / gist:9790374
Created Mar 26, 2014
Github Two-Factor Authentication Failed For HTTPS
View gist:9790374

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

@plamere
plamere / FetchTrackAndAnalysisData.js
Created Apr 9, 2012
Syncing Echo Nest analysis to Spotify playback
View FetchTrackAndAnalysisData.js
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);