Skip to content

Instantly share code, notes, and snippets.

View seansean11's full-sized avatar

Sean Michael seansean11

View GitHub Profile
Undo previous commit
`git revert HEAD^`
Modify previous commit message
`git commit --amend`
Temporarily stash changes
`git stash`
Restore changes from stash
seansean11 / .vimrc
Last active January 14, 2016 01:20
set nocompatible " required
filetype off " required
" Enable syntax highlighting
set number
" Allow backspacing in insert mode
set backspace=2
" Highlight all search results
exports.seed = (knex) =>
.then(() => knex.insert(data.user_roles).into('user_role'))
.then(() => knex('user_address').del())
.then(() => knex.insert(data.user_addresses).into('user_address'))
.then(() => knex('user').del())
.then(() => knex.insert(data.users).into('user'));
seansean11 / .gitignore
Last active May 1, 2017 18:40
.gitignore for WordPress themes
# Ignore everything in the root except the "wp-content" directory.
# Ignore those unneeded sass-cache + node_modules files.
seansean11 / store-types.ts
Last active January 25, 2023 19:03
Using Redux Thunk with Typescript (example)
import { ActionCreator } from 'redux'
import { ThunkAction } from 'redux-thunk'
import { WebService } from 'app/services/WebService'
// Create this reusable type that can be imported into your redux action files
export type ThunkResult<R> = ThunkAction<R, RootState, Services, RootAction>
// Services are only necesarry because we are using
// `reduxThunk.withExtraArgument({ webService }))` when we are creating our store.
export type Services = {