Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Nic Luciano kn0ll

🏠
Working from home
Block or report user

Report or block kn0ll

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View airhex_demo_airlines.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 2. in line 1.
IATA code;ICAO code;Marketing Name;Full Name;Airline Type;Airline Type Code;Lowcost;Status;Country;Alpha-2 Country Code;Alpha-3 Country Code;Year Founded;Website;Web check-in link;Mobile check-in link;iOS app link;Android app link;Official Facebook page;Home city/airport IATA code
FL;TRS;Southwest Airlines;AirTran Airways, Inc.;SCHEDULED;1;1;1;United States;US;USA;1967;https://www.southwest.com;https://www.southwest.com/flight/retrieveCheckinDoc.html;https://mobile.southwest.com/#/check-in;https://itunes.apple.com/us/app/southwest-airlines/id344542975?mt=8;https://play.google.com/store/apps/details?id=com.southwestairlines.mobile&hl=en;https://www.facebook.com/Southwest;MCO
DL;DAL;Delta;Delta Air Lines Inc.;SCHEDULED;1;0;1;United States;US;USA;1924;https://www.delta.com;https://www.delta.com/PCCOciWeb/findBy.action;https://m.delta.com/?p=pnrSearchForm;https://itunes.apple.com/us/app/fly-delta/id388491656?mt=8;https://play.google.com/store/apps/details?id=com.delta.mobile.android&hl=en;https://www.facebook.com
@kn0ll
kn0ll / blurbcloud.py
Created Sep 12, 2015
super hacky script for taking a song off soundcloud and creating a new version where the computer incessantly reads user comments over the audio
View blurbcloud.py
import random
import urllib
import urllib2
import soundcloud
import subprocess
from pydub import AudioSegment
def get_track(client_id, sc_url):
client = soundcloud.Client(client_id=client_id)
track = client.get('/resolve', url=sc_url)
View deck.js
define([
'Audiolet'
], (
Audiolet
) => {
class Mixer extends AudioletGroup {
constructor(audiolet) {
super(audiolet, 1, 1);
@kn0ll
kn0ll / backbone.collectionlayout.js
Created Jun 26, 2013
simple backbone collection layout. extends backbone.layout.js. accepts an `ItemView` and a `collection` and appends a new `ItemView` to it's parent container for each model in the collection
View backbone.collectionlayout.js
Backbone.CollectionLayout = Backbone.Layout.extend({
initialize: function() {
Backbone.Layout.prototype.initialize.apply(this, arguments);
this.listenTo(this.collection, 'add', _.bind(this.modelAdded, this));
},
ItemView: Backbone.Layout,
modelAdded: function(model) {
@kn0ll
kn0ll / backbone.layout.js
Last active Dec 19, 2015
simple backbone layout manager (simple subview definitions, with listener cleanup)
View backbone.layout.js
Backbone.Layout = Backbone.View.extend({
initialize: function() {
this.viewReferences = {};
Backbone.View.prototype.initialize.apply(this, arguments);
},
setView: function(selector, view) {
var $foundViewNode = $(selector, this.$el),
previousView = this.viewReferences[selector];
@kn0ll
kn0ll / session.coffee
Created Feb 28, 2013
a session model for brainy
View session.coffee
define [
'backbone',
'resources/user'
], (Backbone, User) ->
class extends Backbone.Model
idAttribute: '_id'
urlRoot: '/sessions'
defaults:
@kn0ll
kn0ll / class-method.js
Created Feb 22, 2013
Brainy collection using a class method.
View class-method.js
define([
'backbone'
], function(Backbone) {
return Backbone.Collection.extend({
url: '/boops'
}, {
byUserId: function(user_id) {
@kn0ll
kn0ll / emitter.coffee
Created Feb 10, 2013
event listener and event emitter classes inspired by backbone.
View emitter.coffee
# event emitter is an object which is
# responsible for triggering events, and binding
# functions to those events.
class EventEmitter
# events map event names
# to functions which are bound
# to that event. calling model.on evt, fn
# will add that function to the events hash.
events: null
@kn0ll
kn0ll / osc.coffee
Created Feb 1, 2013
a demo osc gui using various backbone/osc components i've written.
View osc.coffee
require [
'zepto',
'osc/client',
'gui/range'
], ($, OscClient, RangeView) ->
osc_client = new OscClient
bar_view = new RangeView
model: osc_client
@kn0ll
kn0ll / backbone.layout.js
Created Jan 30, 2013
backbone layout manager. provides a simple method for mapping elements of a view to subviews.
View backbone.layout.js
Backbone.Layout = Backbone.View.extend({
initialize: function() {
// a map of selector -> view references
this.view_references = {};
// the promises for the data
// required before rendering the view
this.promises = this.data? _.map(this.data(), function(model) {
You can’t perform that action at this time.