Skip to content

Instantly share code, notes, and snippets.

View wkirby's full-sized avatar

Wyatt Kirby wkirby

View GitHub Profile
@wkirby
wkirby / Gemfile
Last active February 14, 2019 00:20
Migrations and Models for Tripartite Identity in Rails 5.2
gem 'devise'
gem 'devise-security'
{"version":1,"resource":"file:///Users/wyatt/Dev/apsis/ream/client/src/components/reviews/EditReviewDescriptionForm.tsx","entries":[{"id":"SpFV.tsx","source":"undoRedo.source","timestamp":1688738061104},{"id":"ACpr.tsx","source":"Workspace Edit","timestamp":1688738286012},{"id":"rSxy.tsx","source":"Workspace Edit","timestamp":1688738425030}]}
@wkirby
wkirby / .apsisrc
Last active November 4, 2020 08:46
Apsis OSX Setup
# Node
nodesize() {
find . -name "node_modules" -type d -prune -print | xargs du -chs
}
nodenuke() {
echo "This command will recursively delete node_modules from your current directory."
echo "Continue (y/n)?"
read CONT
@wkirby
wkirby / active_record_extension.rb
Last active February 8, 2018 23:18
Boring Presenters
# Optionally extend the ActiveRecord model to
# allow you to take an ActiveRecord instance and call
# `#presenter` on it to get an automatically-bound
# presenter.
#
# The downside to this is that it will use a separate
# instance of the presenter for each instance of
# a model, instead of sharing a single presenter
# that gets re-bound to each instance of a model.

Keybase proof

I hereby claim:

  • I am wkirby on github.
  • I am wkirby (https://keybase.io/wkirby) on keybase.
  • I have a public key ASDjR-4wKbsAr01dqddXw3S5Lq6RPAiDpwItdxsGHJEvNwo

To claim this, I am signing this object:

@wkirby
wkirby / related_post_field.php
Last active March 25, 2018 02:13
1-to-1 Relationship Fields for Carbon Fields
<?php
namespace Carbon_Fields\Field;
use Carbon_Fields\Exception\Incorrect_Syntax_Exception;
/**
* Taxonomy field class.
*/
class Related_Post_Field extends Select_Field
{
@wkirby
wkirby / wp_render.php
Last active March 22, 2016 06:37
Better component rendering for Wordpress themes.
<?php
/*
Plugin Name: Apsis Template Render
Plugin URL: http://apsis.io/
Description: Better component rendering for Wordpress Themes
Version: 1.0.0
Author: Apsis Labs
Author URI: http://apsis.io/
*/