Skip to content

Instantly share code, notes, and snippets.

Craig Beck craigbeck

Block or report user

Report or block craigbeck

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
@craigbeck
craigbeck / profileMiddleware.js
Created Mar 30, 2019
redux profile middleware
View profileMiddleware.js
const profileMiddleware = _ => {
console.log('%cINSTALLED profileMiddleware', 'color:magenta');
return next => action => {
if (typeof action.then === 'function') {
return next(action);
}
// eslint-disable-next-line no-console
console.group('dispatch ' + action.type);
console.time(action.type);
const result = next(action);
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@craigbeck
craigbeck / cv-axle-replacement.md
Created Jun 10, 2017
Lexus GX470/4Runner CV axle replacement
View cv-axle-replacement.md

Tools 1 21mm socket 1 19mm socket 1 17mm socket 1 35mm socket 1 10mm hex head socket BFH (big effing hammer) Also a rubber mallet is a plus...or just hit the old axle with the big one as it's coming out anyways. 1 short prybar (12 inches) 1 long prybar (36 inches)

@craigbeck
craigbeck / gx470-resources.md
Last active Aug 25, 2018
Lexus GX470 notes
View gx470-resources.md
@craigbeck
craigbeck / bad-query.gql
Last active May 12, 2016
extra ids in query
View bad-query.gql
query RootQueryType {
recentConversations {
id
...F2
}
}
fragment F0 on Conversation {
id
unreadCount
View query.gql
{
profile {
id
name
email
}
lines {
id
number
@craigbeck
craigbeck / introspection-query.graphql
Created Apr 6, 2016
Introspection query for GraphQL
View introspection-query.graphql
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
@craigbeck
craigbeck / fixsemi.js
Created Mar 15, 2016
automatic fix semicolons from eslint output
View fixsemi.js
#!/usr/bin/env node
var fs = require("fs");
function fixFile(filename, lineNumbers) {
fs.readFile(filename, { encoding: "utf-8", flag: "r" }, function (err, buffer) {
if (err) {
console.error("Could not read", filename, err);
return;
}
You can’t perform that action at this time.