Skip to content

Instantly share code, notes, and snippets.

View subvertallchris's full-sized avatar
💭
🤘 brutal

Chris Grigg subvertallchris

💭
🤘 brutal
  • Long Island City, NY
View GitHub Profile
@subvertallchris
subvertallchris / CacheBusterContainer.tsx
Last active August 10, 2023 01:26
Next.js app directory client cache busting
'use server';
import * as React from 'react';
import { revalidateAction } from './cacheBusterAction';
import { ClientCacheBusterContainer } from './ClientCacheBuster';
export const CacheBusterContainer = ({ children }: { children: React.ReactNode }) => {
return <ClientCacheBusterContainer revalidateAction={revalidateAction}>{children}</ClientCacheBusterContainer>;
};
@subvertallchris
subvertallchris / react-shortcuts.d.ts
Created August 22, 2017 19:53
TypeScript defs for avocode/react-shortcuts
// Type definitions for react-shortcuts v1.6.0
// Project: https://github.com/avocode/react-shortcuts
// Definitions by: Chris Grigg <https://github.com/subvertallchris>
/// <reference types="react"/>
declare namespace ReactShortcuts {
type PlatformType = 'osx' | 'windows' | 'linux' | 'other';
interface Keymap {
@subvertallchris
subvertallchris / .ideavimrc
Created October 2, 2015 17:16
tiny ideavimrc
inoremap jk <ESC>
let mapleader = "\<Space>"
@subvertallchris
subvertallchris / gist:b177362cf437a1a37b73
Created September 29, 2015 14:03
Ruby Challenge Questions

###Challenge Create a repo that contains these classes:

  • Car
  • Motorcycle
  • Vehicle
  • Tank
  • Helicopter
  • QuadCopter
  • Plane
class Person
include Neo4j::ActiveNode
property :name, type: String
property :age, type: Integer
has_many :out, :houses, type: 'OWNS_PROPERTY'
has_many :out, :vehicles, type: 'OWNS_VEHICLE'
end
class House
class Team
include Neo4j::ActiveNode
property :name, type: String
has_one :out, :league, type: :PLAY_IN
end
class League
include Neo4j::ActiveNode
property :name, type: String
property :rank, type: Integer

Keybase proof

I hereby claim:

  • I am subvertallchris on github.
  • I am subvertallchris (https://keybase.io/subvertallchris) on keybase.
  • I have a public key whose fingerprint is 984E 878A 218A DD00 3C2B 8BFA A1FE 4426 5D3F 5D4A

To claim this, I am signing this object:

2015-02-02 17:54:38.301+0000 DEBUG [o.n.k.i.q.QueryExecutionEngine]: MATCH (n) WHERE ID(n) = {neo_id} OPTIONAL MATCH n-[r]-() DELETE n, r
2015-02-02 17:54:38.301+0000 DEBUG [o.n.k.i.q.QueryExecutionEngine]: MATCH (n) WHERE ID(n) = {neo_id} OPTIONAL MATCH n-[r]-() DELETE n, r
2015-02-02 17:54:38.311+0000 DEBUG [o.n.k.i.q.QueryExecutionEngine]: MATCH (n) WHERE ID(n) = {neo_id} OPTIONAL MATCH n-[r]-() DELETE n, r
2015-02-02 17:54:38.311+0000 DEBUG [o.n.k.i.q.QueryExecutionEngine]: MATCH (n) WHERE ID(n) = {neo_id} OPTIONAL MATCH n-[r]-() DELETE n, r
2015-02-02 17:54:38.317+0000 DEBUG [o.n.k.i.q.QueryExecutionEngine]: CREATE (n:`Student` {props}) RETURN ID(n)
2015-02-02 17:54:38.317+0000 DEBUG [o.n.k.i.q.QueryExecutionEngine]: CREATE (n:`Student` {props}) RETURN ID(n)
2015-02-02 17:54:38.323+0000 ERROR [o.n.s.r.t.TransactionFacade]: Failed to commit transaction.
java.lang.RuntimeException: org.neo4j.kernel.api.exceptions.TransactionFailureException: Transaction rolled back even if marked as successful
at org.neo4
Feb 02, 2015 10:19:30 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.18.1 02/19/2014 03:28 AM'
Feb 02, 2015 10:19:30 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.18.1 02/19/2014 03:28 AM'
Feb 02, 2015 10:19:30 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.18.1 02/19/2014 03:28 AM'
2015-02-02 15:19:27.559+0000 INFO [API] Setting startup timeout to: 120000ms based on 120000
2015-02-02 15:19:29.222+0000 INFO [API] Successfully started database
2015-02-02 15:19:29.296+0000 INFO [API] Starting HTTP on port :7474 with 8 threads available
2015-02-02 15:19:29.520+0000 INFO [API] Enabling HTTPS on port :7473
2015-02-02 15:19:29.520+0000 INFO [API] No SSL certificate found, generating a self-signed certificate..
10:19:29.885 [main] INFO org.eclipse.jetty.util.log - Logging initialized @3767ms
2015-02-02 15:19:29.956+0000 INFO [API] Mounting static content at [/webadmin] from [webadmin-html]
2015-02-02 15:19:30.013+0000 INFO [API] Mounting static content at [/browser] from [browser]
10:19:30.016 [main] INFO org.eclipse.jetty.server.Server - jetty-9.2.1.v20140609
10:19:30.035 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.MovedContextHandler@30159886{/,null,AVAILABLE}