Skip to content

Instantly share code, notes, and snippets.

@godkinmo
godkinmo / README.md
Created August 8, 2022 02:52 — forked from hofmannsven/README.md
Increase key repeat rate on macOS

Increase key repeat rate on macOS

Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat

Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.

Source: https://apple.stackexchange.com/a/83923

@godkinmo
godkinmo / AppServiceProvider.php
Created October 11, 2019 06:40 — forked from reinink/AppServiceProvider.php
Eloquent addSubSelect()
<?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()
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 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
godkinmo / v-cloak.md
Created May 1, 2019 06:56 — forked from adamwathan/v-cloak.md
Useful CSS utilities for Vue.js cloaking

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

Use like:

<div v-cloak>
  <h1>
    <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
godkinmo / pr.md
Created April 28, 2019 16:27 — forked from piscisaureus/pr.md
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 = git@github.com:joyent/node.git

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:

@godkinmo
godkinmo / 1-add-middleware.php
Created February 15, 2018 18:30 — forked from adamwathan/1-add-macros.php
Multiformat Endpoints in Laravel
<?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));