Skip to content

Instantly share code, notes, and snippets.

View dannypage's full-sized avatar

Danny Page dannypage
View GitHub Profile
dannypage /
Last active September 24, 2021 00:27 — forked from mikepqr/
Make printouts from Firefox Reader mode look like dang NYRB artices

To install in Firefox:

  1. If it doesn't already exist, create a folder called chrome in your profile folder. The easiest way to find your profile folder is in about:profiles (there's a "Show in Finder" link for the folder on macOS). Be sure to choose the right profile is you have more than one.

  2. Put userContent.css above in the chrome folder you just created.

  3. Load about:config in Firefox then set toolkit.legacyUserProfileCustomizations.stylesheets to true.

  4. Quit and reopen Firefox, just for luck.

dannypage / twitter_font_adblock.txt
Created August 24, 2021 21:44
How to block Twitter's terrible font
# Go to uBlock's options and paste in the following under the "My Filters" tab
dannypage / color_palatte.rb
Created May 11, 2019 20:21
A sample DragonRuby program to display a few learnings; How to include new classes, create buttons to update state, manage the update loop, and easily add new color schemes.
class ColorPalatte
attr_accessor :colors
def initialize clrs
clrs.each_with_index do |c, i|
clrs[i] = hex_to_rgb c
@colors = clrs
dannypage / basicgorillas.rb
Created May 8, 2019 21:51 — forked from icculus/basicgorillas.rb
DragonRuby Basic Gorillas
# This is the complete source code to Basic Gorillas:
# You can tinker with this by getting a copy of DragonRuby Game Toolkit:
# Amir Rajan wrote this game, catch him at !
class YouSoBasicGorillas
attr_accessor :outputs, :grid, :game, :inputs
dannypage /
Last active January 15, 2019 05:04
<div id="locations-nav-dropdown" class="locations-dropdown-displayed">
<div class="table">
<div class="tc" id="locations-dropdown-paj-cell">
<div class="locations-dropdown-paj text-center">
<div class="fs-24 text-bold">Did you know?</div>
<img class="did-you-know-img marg-t-10 marg-b-20" src="" alt="Magnifying people@2x">
<div class="fs-13 text-bold">
No need to spend hours finding a lawyer, post a job and get custom quotes from experienced lawyers instantly.
<a class="btn btn-success text-uppercase marg-t-20 track-click-paj" href="/jobs/new">Post a Job</a>
dannypage / sample_queries.sql
Created September 13, 2017 19:41
Hockey SQL Tutorial - Postgres 9.6 -!17/8395d/4/0
-- All players in the Hall of Fame table.
FROM "Hall of Fame";
-- All players in the Hall of Fame table, ordered by points.
FROM "Hall of Fame"
ORDER BY "Points" desc;
-- All players in the Hall of Fame table, with at least 1000 points.
dannypage / chain.rb
Last active July 28, 2017 19:25
Trying to solve the chain problem by brute force. Uses 4 cores with the Parallel gem.
# ruby chain.rb &
# writes to /tmp/chain_results.log
require 'parallel'
def number_chain( n, range, chain)
chain << n
next_numbers = []
dannypage / concrete-v03.rb
Created October 10, 2016 14:01 — forked from AlexandreRangel/concrete-v03.rb
Sonic Pi music code
# Alexandre rANGEL
# born out of concrete v03
# 9/Oct/2016
# Sonic Pi 2.11 dev
use_bpm 120
live_loop :notes1 do
with_bpm 240 do
x = tick
dannypage / Wikidata_stadium_lat_long.tsv
Last active May 11, 2020 17:26
@deepxg created a query to hit Wikidata for all stadiums and their lat&long as known by Wiki - URL in second file.
countryName leagueName teamName venueName lat long
Abkhazia Abkhazian Football Championship FC Dinamo Sukhumi
Abkhazia Abkhazian Football Championship Nart Sukhum
Afghanistan Kabul Premier League Ariana Kabul F.C. Ghazi Stadium 34.518531 69.193711
Afghanistan Kabul Premier League Hakim Sanayi Kabul F.C.
Afghanistan Kabul Premier League Javan Azadi Kabul F.C. Ghazi Stadium 34.518531 69.193711
Afghanistan Kabul Premier League Maiwand Kabul F.C. Ghazi Stadium 34.518531 69.193711
Afghanistan Kabul Premier League Ordu Kabul F.C.
Afghanistan Kabul Premier League Pamir Kabul F.C.
Afghanistan Kabul Premier League Real Afghan Kabul