Skip to content

Instantly share code, notes, and snippets.

godkinmo /
Created Oct 26, 2020
My zsh function to quick open tinkerwell in terminal
function tinkerwell {
if [ $# -eq 0 ] || [ $1 = "." ]; then
TW_PATH=$(echo -n $TW_PATH | base64)
open "tinkerwell://?cwd=$TW_PATH"
godkinmo /
Created Feb 4, 2020
An bash function for opening the project's database in TablePlus config in zshconfig
function dbopen() {
if [ -d '/Applications/' ]; then
DRIVER=$(grep -m1 DB_CONNECTION .env | cut -d '=' -f2)
HOST=$(grep -m1 DB_HOST .env | cut -d '=' -f2)
USER=$(grep -m1 DB_USERNAME .env | cut -d '=' -f2)
PASSWORD=$(grep -m1 DB_PASSWORD .env | cut -d '=' -f2)
DATABASE=$(grep -m1 DB_DATABASE .env | cut -d '=' -f2)
if [ $DRIVER = "sqlite" ]; then
View AppServiceProvider.php
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Query\Builder as QueryBuilder;
use Illuminate\Database\Query\Expression;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
public function boot()
View .gvimrc
" Font
:set guifont=Source\ Code\ Pro:h14
" Hide pointless junk at the bottom, doesn't work in .vimrc for some reason?
:set laststatus=0
:set noshowmode "don't show --INSERT--
:set noruler "don't show line numbers/column/% junk
godkinmo /
Created May 1, 2019 — forked from adamwathan/
Useful CSS utilities for Vue.js cloaking

Handy helpers for controlling visibility of elements until Vue has compiled.

Use like:

<div v-cloak>
    <span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
    <span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
godkinmo /
Created Apr 28, 2019 — forked from piscisaureus/
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

View .vimrc
imap hh <Esc>
set nocompatible
set encoding=utf-8
set laststatus=2
set nowrap " don't wrap lines
set tabstop=4 " a tab is four spaces
set smarttab
set tags=tags
set softtabstop=4 " when hitting <BS>, pretend like a tab is removed, even if spaces
godkinmo / jackfong.itermcolors
Last active May 1, 2018
View jackfong.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<key>Ansi 0 Color</key>
<key>Alpha Component</key>
<key>Blue Component</key>
godkinmo / 1-add-middleware.php
Created Feb 15, 2018 — forked from adamwathan/1-add-macros.php
Multiformat Endpoints in Laravel
View 1-add-middleware.php
namespace App\Http\Middleware;
class CaptureRequestExtension
public function handle($request, $next)
if ($request->route()->parameter('_extension') !== null) {
$request->attributes->set('_extension', substr($request->route()->parameter('_extension'), 1));