Skip to content

Instantly share code, notes, and snippets.


Connor Shea connorshea

Block or report user

Report or block connorshea

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
connorshea / SMARTY2_BC_NOTES
Created Oct 8, 2019
Smarty Backwards Compatibility Notes since the official source of these notes now 404s.
= Known incompatibilities with Smarty 2 =
== Syntax ==
Smarty 3 API has a new syntax. Much of the Smarty 2 syntax is supported
by a wrapper but deprecated. See the README that comes with Smarty 3 for more
The {$array|@mod} syntax has always been a bit confusing, where an "@" is required
to apply a modifier to an array instead of the individual elements. Normally you
connorshea / yard_trimmer.rb
Last active Sep 20, 2019
A simple little script to make it easier to add YARD docs for a Faker class.
View yard_trimmer.rb
# A simple little script to make it easier to add YARD docs for a Faker class.
require 'bundler/inline'
gemfile do
source ''
gem 'activesupport', '~> 6.0.0'
gem 'tty-prompt'
require 'open-uri'
connorshea / flamegraph.svg
Created Sep 16, 2019
Flamegraph for generating sorbet-rails model RBIs with a custom plugin
View flamegraph.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
connorshea / 1before.log
Created Sep 8, 2019
Rails' logging for booting the server and loading the homepage in my browser, before and after using a logger that makes ActiveStorage shut up
View 1before.log
=> Booting Puma
=> Rails 6.0.0 application starting in development
=> Run `rails server --help` for more startup options
Puma starting in single mode...
* Version 4.1.0 (ruby 2.6.3-p62), codename: Fourth and One
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop
Started GET "/" for at 2019-09-07 21:00:03 -0600
connorshea / cursed.rb
Created Aug 2, 2019
`User::GeneratedAttributeMethods` methods in `hidden.rbi` on Rails 6
View cursed.rb
module User::GeneratedAttributeMethods
def bio(); end
def bio=(value); end
def bio?(*args); end
def bio_before_last_save(*args); end
def bio_before_type_cast(*args); end
connorshea / dumb-find-common-tests-script.rb
Created Jul 19, 2019
a dumb script for finding common tests that occur before and after the failing AccountsCest inline edit test. Trying to figure out what tests are causing this to succeed or fail.
View dumb-find-common-tests-script.rb
good1 = [
"✔ SurveysCest: View the surveys module for testing",
"✔ CompanyModuleCest: Create a company module for testing",
"✔ CompanyModuleCest: View company test module",
"✔ UsersCest: Create an account",
"✔ jjwg_Address_CacheCest: View the mapsaddresscache module for testing",
"✔ TargetsCest: View the targets module for testing",
"✔ jjwg_AreasCest: View the mapsareas module for testing",
"✔ LoginCest: Login as an administrator",
"✔ jjwg_Address_CacheCest: Create maps address cache",
View error.log
Connors-MacBook-Pro:vglist connorshea$ bundle exec rspec spec/requests/platforms_spec.rb
Randomized with seed 42292
1) Platforms GET platform_path returns http success for platform that has everything
Failure/Error: sig { params(user: T.nilable(User), platform: T.nilable(Platform::Relation)).void }
uninitialized constant Platform::Relation
# ./app/policies/platform_policy.rb:10:in `block in <class:PlatformPolicy>'
connorshea / tasks.jsonc
Created Apr 20, 2019
VS Code `tasks.json` file for DragonRuby Game Toolkit, drop it in `.vscode/tasks.json` in the dragonruby folder and then open the Command Palette (Ctrl/Cmd + Shift + P), choose "Run task", and then choose your task :) Should work on macOS and Linux, not sure about Windows.
View tasks.jsonc
// tasks.json for dragonruby samples
"version": "2.0.0",
"tasks": [
"label": "doomwipe",
"type": "shell",
"command": "./dragonruby samples/doomwipe/",
"problemMatcher": []
connorshea /
Last active Apr 25, 2019
An idea for a 'Learn X in Y Minutes' extension.

Make a VS Code extension that displays content from Learn X in Y Minutes.

I imagine this'd work as follows:

  • Open the Command Palette
  • Run the command 'Show example from Learn X in Y Minutes'
  • Pick a page from the list of options (Essentially just the page names, Ruby, Go, PHP, Python, etc.)
  • The extension opens a view that displays the formatted Markdown. (Use VS Code's built-in Markdown renderer to render the Markdown.)

The extension would only support English to start with, I guess. I'm not sure if it'd be sufficient to download the markdown file from the Learn X in Y Minutes repo on-demand or if it'd be better to bundle it in the extension. The license for LXIYM is CC-BY-SA so credit needs be given, obviously.

You can’t perform that action at this time.