Skip to content

Instantly share code, notes, and snippets.

View funkytaco's full-sized avatar

Luis Gonzalez funkytaco

View GitHub Profile
#!/usr/bin/env node
/*
Use the Yahoo Finance CSV API to do some basic market research calculations.
- Background: http://greenido.wordpress.com/2009/12/22/yahoo-finance-hidden-api/
- Example URL: http://finance.yahoo.com/d/quotes.csv?s=GOOG+FB+AAPL&f=snj1pr
s: Symbol
n: Name
j1: Market Capitalization (in billions)
p: Price-per-share (at previous close)
@funkytaco
funkytaco / gist:767644644105502e9bae94ab9049f6d8
Created January 31, 2017 22:27
Docker 1.13.0 release notes
Upgrades
Docker 1.13.0
Docker Compose 1.10
Docker Machine 0.9.0
Notary 0.4.3
Linux kernel 4.9.4
qcow-tool 0.7.2
New
@funkytaco
funkytaco / post.md
Created November 30, 2016 22:59 — forked from simonexmachina/post.md
JavaScript and Object Models

JavaScript and Object Models

A "choose your own adventure" story

JavaScript is has both object-oriented and functional heritage, thanks to its two parents: Scheme and Self.

It provides first class functions and makes it simple to compose these function objects into bundles of awesome. Even though I'm an OO "true believer" at heart, I find myself composing my code using functional concepts, and use the OO approach where there's a clear benefit or where I feel that it's the best way to communicate the interface.

Object-oriented software design is by no means the only way to do software design, but it's been an immensely successful model for a very long time now, and provides a clear and well-understood mental model for thinking and communicating about software. Lots of good ideas like encapsulation, delegation, traits and composition fit well into OO design.

@funkytaco
funkytaco / valueInspector.jsx
Created September 23, 2016 00:55 — forked from luggage66/valueInspector.jsx
CFDump-like output for JS objects
import React, { Component } from 'react';
import './valueInspector.less';
import Immutable from 'immutable';
export default class ValueInspector extends Component
{
render() {
let referenceTracker = new CircularReferenceTracker();
let path = Immutable.List();
Air Conditioning
Alarm Clock
Balcony
Blender
Books
Ceiling Fans
Children's Pool
Dining Seats (4)
Dryer
DVD Player
Swimming poolSuitable for children age 5+Air conditioningNo pets allowedPrivate garden
FAMILIES
Suitable for children over 5No pets allowed
BED & BATHROOM
Bedroom 1: King bed
Bedroom 2: King bed
Bedroom 3: Queen Bed
Bedroom 4: Queen Bed
@funkytaco
funkytaco / gist:8a4f1369f937ffd03c78e98109e00e77
Created August 29, 2016 02:35
"Beautiful Townhouse in Tulum with Pool
Air Conditioning
Balcony
Blender
Ceiling Fans
Deck
Dining Seats (6)
Dryer
DVD Player
En Suite Rooms (2)
Freezer
chef gem uninstall mime-types
Select gem to uninstall:
1. mime-types-1.25.1
2. mime-types-2.6.2
3. All versions
> 1
You have requested to uninstall the gem:
mime-types-1.25.1
@funkytaco
funkytaco / candy_calculator.py
Created July 17, 2016 19:26
Pokemon: GO Candy/Evolution Calculator
def main():
while True:
try:
pokemon = int(input("How many Pokemon do you have? "))
if pokemon >= 0:
break
raise ValueError
except ValueError:
print("Invalid number")
<form class="form-horizontal" action="/api/1.0/tickets/" method="POST">
<fieldset>
<div class="form-group">
<label for="username" class="control-label col-xs-2">User</label>
<div class="col-xs-10">
<input disabled="disabled" type="user" class="form-control" id="username" name="username" placeholder="{{logged_in_user}}">
</div>
</div>
<div class="form-group">
<label for="summary" class="control-label col-xs-2">Summary</label>