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
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.

connorshea /
Last active Mar 23, 2019
Some simple, useful SPARQL queries I've written to help match PCGamingWiki articles to Wikidata items.

Some Wikidata queries I'd like to make.

Items with PCGW ID and 'n/a' description

Items with PCGamingWiki ID (P6337) and the english description 'n/a'.

This query catches a problem caused by creation of new items when running Mix'n'Match with the PCGW dataset. The Mix'n'match dataset lacks proper descriptions, which has an unintended side effect of new items being created with the description 'n/a'.

connorshea / engines.json
Created Feb 5, 2019
Get all engines on PCGamingWiki along with their Wikipedia pages if they have them. Output is available in engines.json.
View engines.json
"pcgw_name": "Engine:3DMark Vantage",
"pcgw_url": "//",
"wikipedia": "3DMark",
"wikipedia_url": ""
"pcgw_name": "Engine:3Dream",
"pcgw_url": "//",
connorshea / pcgw_to_wikidata.rb
Last active Jan 10, 2019
Run with `WIKIDATA_USERNAME=username WIKIDATA_PASSWORD=password ruby pcgw_to_wikidata.rb`, you'll need a CSV with all the PCGW articles and Steam App IDs
View pcgw_to_wikidata.rb
# gem install sparql
# gem install mediawiki_api-wikidata
require 'sparql/client'
require 'json'
require 'csv'
require 'open-uri'
require 'mediawiki_api'
require "mediawiki_api/wikidata/wikidata_client"
connorshea / generate_pcgw_list.rb
Created Jan 9, 2019
PCGW data conversion for Wikidata
View generate_pcgw_list.rb
require 'open-uri'
require 'json'
gcmcontinue_value = ""
games_list = []
index = 0
loop do
if index == 0
api_url = ''
connorshea / wikidata-sparql.ruby
Created Dec 29, 2018
A JSON file with every entity on Wikidata that is an instance of video games
View wikidata-sparql.ruby
# gem install sparql
# NOTE: This code is bad, don't use it.
require 'sparql/client'
require 'rdf'
require 'json'
endpoint = ""
connorshea / dvd-screensaver.html
Created Dec 25, 2018
Based on, a simple HTML page that renders a simulation of the DVD screensaver.
View dvd-screensaver.html
<!DOCTYPE html>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>DVD Screensaver</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
You can’t perform that action at this time.