A train runs along this (randomly generated) track.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CALL_API } from 'redux-api-middleware' | |
export function fetchLocations() { | |
return { | |
[CALL_API]: { | |
endpoint: 'http://api.somesite.com/api/locations', | |
method: 'GET', | |
// Don't have to manually add the Authorization header to every request. | |
headers: { 'Content-Type': 'application/json' }, | |
types: ['REQUEST', 'SUCCESS', 'FAILURE'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CALL_API } from 'redux-api-middleware' | |
export default function({ getState }) { | |
return function(next) { | |
return function(action) { | |
const callApi = action[CALL_API] | |
if (callApi) { | |
const { authToken } = getState() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am benpickles on github. | |
* I am benpickles (https://keybase.io/benpickles) on keybase. | |
* I have a public key whose fingerprint is D3E2 C490 65FA 7406 95B1 8556 B014 2155 1D63 7BB7 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
height: 90 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--database=postgresql | |
--skip-bundle | |
--skip-javascript | |
--skip-keeps | |
--skip-spring | |
--skip-test-unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.path { | |
fill: transparent; | |
stroke: #ddd; | |
stroke-dasharray: 2 4; | |
stroke-width: 2; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BUNDLES = $(shell ls bundle) | |
BUNDLE_TARGETS = $(addprefix update_, $(BUNDLES)) | |
list: | |
@for BUNDLE in $(BUNDLES); do echo $$BUNDLE; done | |
update: $(BUNDLE_TARGETS) | |
update_%: | |
cd bundle/$(*F) && git pull |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rehearsal ---------------------------------------- | |
gsub 0.013451 0.000356 0.013807 ( 0.013817) | |
sub 0.005154 0.000086 0.005240 ( 0.005302) | |
------------------------------- total: 0.019047sec | |
user system total real | |
gsub 0.011792 0.000351 0.012143 ( 0.012186) | |
sub 0.003583 0.000001 0.003584 ( 0.003583) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) | |
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: | |
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired | |
require "dispatcher" | |
ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) | |
Dispatcher.dispatch |
NewerOlder