Skip to content

Instantly share code, notes, and snippets.

Avatar

Richard Cornish richardcornish

View GitHub Profile
@dannysteenman
dannysteenman / Text Substitutions.plist
Created Jul 16, 2020
macOS emoji text replacements
View Text Substitutions.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>phrase</key>
<string>👎</string>
<key>shortcut</key>
<string>:-1:</string>
</dict>
@Sauerstoffdioxid
Sauerstoffdioxid / googleurlparams.md
Last active Jul 29, 2021
Google/Blogger Image URL Parameters
View googleurlparams.md

Google/Blogger Image URL Parameters

This is an effort to document what is known about Google's (Blogger's/Blogspot's) image URL parameters. Some of these options were taken from existing first or third party documentation (see the links at the end of this document), but the majority is based off my own investigations.

Where to use them?

  • On Blogger's image URL's: 2.bp.blogspot.com/-OF7u67HQE1M/VHc8S8qJTDI/AAAAAAAACxI/UD-11c63diQ/s1600/005.png
  • On just about any googleusercontent image URL: https://lh3.googleusercontent.com/Jvmz11cLrvNIHG_LWjVO9B-UV2IN4Cfk1pycbhWZl6IriMgCAGCOFuBRtoHaiZ6xeVGqCugZcCql=w176-h176-n-o

Replace the bolded parts with the parameters.

@veltman
veltman / README.md
Last active May 26, 2021
Generating an SVG from a set of shapefiles
View README.md

Generating an SVG from a set of shapefiles

The USGS provides detailed downloads of fire perimeters, with timestamped files that can be used to show the spread of a major fire over time.

Using the 2017 Thomas fire as an example, we'll process this data into a single SVG file with all the different perimeter measurements.

This index page contains links to a series of shapefiles of the fire boundary, each one with a timestamp:

https://rmgsc.cr.usgs.gov/outgoing/GeoMAC/2017_fire_data/California/Thomas/

View rpi4-retroarch.md

Setting up RetroArch on Raspberry Pi 4 and building emulator cores

Guide for myself and others to get RetroArch running on the new Raspberry Pi 4 while projects like RetroPie get an image out for the rpi4.
Disclaimer: I am not an expert and this may not be the most optimal build possible, but it works.

Inspiration taken from:

@rchrd2
rchrd2 / models.py
Last active Jun 1, 2021
Django object manager with Haversine distance annotation method (aka filter by distance with mysql)
View models.py
from django.db import models
from with_distance_manager import WithDistanceManager
class Foo(models.Model):
longitude = models.DecimalField(max_digits=19, decimal_places=10, null=True)
latitude = models.DecimalField(max_digits=19, decimal_places=10, null=True)
objects = WithDistanceManager()
@JamoCA
JamoCA / Comment-Spam-Addresses.txt
Last active Apr 20, 2021
A list of email addresses (or domains when the username is randomized) that are actively blocked using our internal feedback form and/or comment spam filters. Updated regularly. Last Updated: 4/20/2021 (When comparing, sanitize gmail addresses to remove dots & + https://gist.github.com/JamoCA/6f46af76a3f8b9975ccc0623602a92f1 )
View Comment-Spam-Addresses.txt
@30secondexplainervideos.com
@3dAnimatedVideos.com
@90secondexplainervideos.com
@accurate.com
@acquimail.com
@adkarma.com
@allhatsmedia.org
@allhatsseo2u.com
@amazon-service.xyz
@aplana.us
@dannguyen
dannguyen / faa-333-pdf-gathering.md
Last active Jun 19, 2021
Using wget + grep to explore inconveniently organized federal data (FAA Section 333 Exemptions)
View faa-333-pdf-gathering.md

if !database: wget + grep

The Federal Aviation Administration is posting PDFs of the Section 333 exemptions that it grants, i.e. the exemptions for operators who want to fly drones commercially before the FAA finishes its rulemaking. A journalist wanted to look for exemptions granted to operators in a given U.S. state. But the FAA doesn't appear to have an easy-to-read data file to use and doesn't otherwise list exemptions by location of operator.

However, since their exemptions page is just one giant HTML table for listing the PDFs, we can just use wget to fetch all the PDFs, run pdftotext on each file, and then [grep](https://medium.com/@rualthanzauva/grep-was-a-private-command-of-m

View scraping_links.md
View gist:8285680
ENGLISH_PREPOSITIONS = (
'aboard',
'about',
'above',
'across',
'after',
'against',
'along',
'amid',
'among',
View StripeTutorialPage.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<!-- The required Stripe lib -->
<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->