Skip to content

Instantly share code, notes, and snippets.

View Angeldude's full-sized avatar

Angel Vanegas Angeldude

View GitHub Profile
# Configure colors, if available.
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset='\[\e[0m\]'
c_user='\[\e[0;32m\]'
c_path='\[\e[1;34m\]'
c_git_clean='\[\e[0;37m\]'
c_git_staged='\[\e[0;32m\]'
c_git_unstaged='\[\e[0;31m\]'
else
c_reset=
@Angeldude
Angeldude / introrx.md
Last active August 29, 2015 14:28 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@Angeldude
Angeldude / preprocessor_fun.h
Created September 25, 2015 01:48 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@Angeldude
Angeldude / ieee80.c
Created September 25, 2015 17:42 — forked from anonymous/ieee80.c
portsf
/***************************************************************\
* IEEE80.c *
* Convert between "double" and IEEE 80 bit format *
* in machine independent manner. *
* Assumes array of char is a continuous region of 8 bit frames*
* Assumes (unsigned long) has 32 useable bits *
* billg, dpwe @media.mit.edu *
* 01aug91 *
* 19aug91 aldel/dpwe workaround top bit problem in Ultrix *
* cc's double->ulong cast *
@Angeldude
Angeldude / flippinawesome.js
Created November 10, 2015 23:47 — forked from kevincennis/flippinawesome.js
Better timing
var audio = new window.webkitAudioContext(),
position = 0,
scale = {
g: 392,
f: 349.23,
e: 329.63,
b: 493.88
},
song = "gfefgg-fff-gbb-gfefggggffgfe---";
import React, { Component } from 'react';
import {render} from 'react-dom';
class SearchBox extends Component {
render(){
return (
<input type="search"
value={this.props.value}
onChange={this.props.onSearch.bind(this)}/>
import React, { Component } from 'react'
import {render} from 'react-dom'
import Toggable from './Toggable'
class App extends Component {
constructor() {
super()
this.state = {
amountOfItems: 0,
totalPrice: 0
import React, { Component, PropTypes } from 'react';
import { render } from 'react-dom';
import 'whatwg-fetch';
// Renders a SearchBar and a ContactList
// Passes down filterText state and handleUserInput callback as props
class ContactsApp extends Component {
constructor(){
super();
this.state={
@Angeldude
Angeldude / App.js
Created February 16, 2016 21:52 — forked from cassiozen/App.js
import React, { Component, PropTypes } from 'react';
import { render } from 'react-dom';
import bankStore from './bankStore';
class BankApp extends Component {
handleDeposit() {
bankStore.dispatch({type:"deposit", amount: this.refs.amount.value})