Skip to content

Instantly share code, notes, and snippets.

View insin's full-sized avatar
⚠️
Cannot read property 'status' of undefined

Jonny Buchanan insin

⚠️
Cannot read property 'status' of undefined
View GitHub Profile
@insin
insin / bash_prompt.sh
Created December 3, 2011 01:49 — forked from woods/git_svn_bash_prompt.sh
Set color bash prompt according to active virtualenv, git branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
@insin
insin / ReduxMicroBoilerplate.js
Last active May 30, 2023 19:54 — forked from gaearon/ReduxMicroBoilerplate.js
Super minimal React + Redux app
import React, { Component } from 'react';
import { createStore, combineReducers, applyMiddleware, bindActionCreators } from 'redux';
import { provide, connect } from 'react-redux';
import thunk from 'redux-thunk';
const AVAILABLE_SUBREDDITS = ['apple', 'pics'];
// ------------
// reducers
// ------------
@insin
insin / README.md
Created February 8, 2016 19:42 — forked from rgrove/README.md
Cake's approach to React Router server rendering w/code splitting and Redux

Can't share the complete code because the app's closed source and still in stealth mode, but here's how I'm using React Router and Redux in a large app with server rendering and code splitting on routes.

Server

  1. Wildcard Express route configures a Redux store for each request and makes an addReducers() callback available to the getComponents() method of each React Router route. Each route is responsible for adding any Redux reducers it needs when it's loaded. (This isn't really necessary on the
@insin
insin / Consumer.js
Created May 26, 2016 12:21 — forked from iammerrick/Consumer.js
A React component that computes the ratio based on the width or height of a given container.
import { FluidRatio } from './FluidRatio';
<FluidRatio>
{(width, height) => (
<div style={{ width, height }}>This will be a ratio of 3/4 with a width of whatever container it is rendered into.</div>
)}
</FluidRatio>
@insin
insin / reporter.js
Created January 22, 2014 00:13 — forked from Macil/reporter.js
(function(exports) {
function nop() {}
// IE doesn't always have console, place a no-op shim for it.
if (!window.console) {
window.console = {log: nop, info: nop, warn: nop, error: nop};
}
// Transforms an Error to a simple object that can be JSONified.
function error_to_object(error) {
@insin
insin / timeout.html
Last active December 27, 2015 16:49 — forked from jcoglan/timeout.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
</head>
<body>
<script>
// alerts 'fake' then 'real'
#!/bin/bash
# Favicon and Apple Touch Icon Generator
#
# This bash script takes an image as a parameter, and uses ImageMagick to convert it to several
# other formats used on modern websites. The following copies are generated:
#
# * apple-touch-icon-114x114-precomposed.png
# * apple-touch-icon-57x57-precomposed.png
# * apple-touch-icon-72x72-precomposed.png

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

@insin
insin / 00-README.rst
Created December 13, 2012 00:14 — forked from anonymous/01-table.html
Creating nested contents and pulling out created element references with dombuilder
@insin
insin / lex.js
Created July 6, 2012 10:07 — forked from tj/lex.js
/**
* Scan the given `str` returning tokens.
*
* @param {String} str
* @return {Array}
* @api public
*/
module.exports = function(str) {
var indents = [0]