Skip to content

Instantly share code, notes, and snippets.

:shipit:
Shipping

Connor Shea connorshea

:shipit:
Shipping
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 }
ActionView::Template::Error:
uninitialized constant Platform::Relation
# ./app/policies/platform_policy.rb:10:in `block in <class:PlatformPolicy>'
@connorshea
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
connorshea / vscode-extension-idea.md
Last active Apr 25, 2019
An idea for a 'Learn X in Y Minutes' extension.
View vscode-extension-idea.md

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
connorshea / wikidata_queries.md
Last active Mar 23, 2019
Some simple, useful SPARQL queries I've written to help match PCGamingWiki articles to Wikidata items.
View wikidata_queries.md

Some Wikidata queries I'd like to make.

https://query.wikidata.org

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
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": "//pcgamingwiki.com/wiki/Engine:3DMark_Vantage",
"wikipedia": "3DMark",
"wikipedia_url": "https://en.wikipedia.org/wiki/3DMark"
},
{
"pcgw_name": "Engine:3Dream",
"pcgw_url": "//pcgamingwiki.com/wiki/Engine:3Dream",
@connorshea
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
#http://www.rubydoc.info/github/ruby-rdf/sparql/frames
require 'sparql/client'
require 'json'
require 'csv'
require 'open-uri'
require 'mediawiki_api'
require "mediawiki_api/wikidata/wikidata_client"
@connorshea
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 = 'https://pcgamingwiki.com/w/api.php?action=query&generator=categorymembers&gcmtitle=Category:Games&prop=info&inprop=url&gcmlimit=500&format=json'
@connorshea
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.
# http://www.rubydoc.info/github/ruby-rdf/sparql/frames
require 'sparql/client'
require 'rdf'
require 'json'
endpoint = "https://query.wikidata.org/sparql"
@connorshea
connorshea / dvd-screensaver.html
Created Dec 25, 2018
Based on http://prgreen.github.io/blog/2013/09/30/the-bouncing-dvd-logo-explained/, a simple HTML page that renders a simulation of the DVD screensaver.
View dvd-screensaver.html
<!DOCTYPE html>
<html>
<head>
<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" />
</head>
<body>
<style>
You can’t perform that action at this time.