Skip to content

Instantly share code, notes, and snippets.

Tyler Brown tybro0103

Block or report user

Report or block tybro0103

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
@tybro0103
tybro0103 / client-index.js
Last active Jul 17, 2017
Simple Isomorphic Bits
View client-index.js
const isoComps = {
'session-menu-root': SessionMenu,
};
const isoData = window.isoData || {};
Object.keys(isoData).forEach(id => {
const props = isoData[id];
const el = document.getElementById(id);
const Comp = isoComps[id];
if (props && el && Comp) {
render(<Comp {...props} />, el);
@tybro0103
tybro0103 / config.js
Last active Mar 25, 2016
Universal JavaScript Config Vars
View config.js
// /app/config.js
class Config {
constructor() {
this.data = {};
}
setData(data) {
this.data = {...this.data, ...data};
@tybro0103
tybro0103 / about.jsx
Last active Jan 28, 2016
React Router (v2-rc5) async hook swallowing error
View about.jsx
import React, { Component } from 'react';
import Promise from 'promise';
export default class About extends Component {
render() {
// intentional error
this.what.theFuck();
return <h2>About</h2>;
@tybro0103
tybro0103 / test.rb
Created Nov 26, 2012
Twilio API Paging Bug
View test.rb
require 'json'
require 'rest_client'
ACCOUNT_SID = "XXX"
AUTH_TOKEN = "YYY"
API_BASE = "https://#{ACCOUNT_SID}:#{AUTH_TOKEN}@api.twilio.com"
TEST_DATE = "2012-10-27"
def fetch_call_sids_from_uri(uri, sids=[])
# fetch and parse data
You can’t perform that action at this time.