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>
@veltman
veltman / README.md
Last active Mar 9, 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:

@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 May 21, 2019
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 -->
@venkatesh22
venkatesh22 / django custom signal
Created Jun 26, 2013
django custom signals creation example
View django custom signal
#signals.py
from django.dispatch import Signal
user_login = Signal(providing_args=["request", "user"])
#views.py
from foo import signals
@harrisj
harrisj / tinyurl_test.rb
Created Apr 26, 2012
Testing Punctuation on URL Shorteners
View tinyurl_test.rb
require 'net/http'
# These links were taken from my twitter timeline. No endorsement implied.
tiny_urls = {
'bitly' => ['http://bit.ly/3S9c5K', 'http://developer.nytimes.com/'],
'j.mp' => ['http://j.mp/JsML0u', 'http://www.npr.org/2012/04/26/151303230/an-african-trader-and-the-perils-of-business-in-china'],
'tinyurl' => ['http://tinyurl.com/6rq9vob', 'http://politicsoftheplate.com/?p=1283'],
'owly' => ['http://ow.ly/axesj', 'http://threatpost.com/en_us/blogs/opera-12-beta-released-new-security-features-including-do-not-track-support-042612'],
'ht.ly' => ['http://ht.ly/1j7LiX', 'http://rssfeeds.usatoday.com/~r/usatoday-LifeTopStories/~3/8vFV-fFfhAc/1'],
'is.gd' => ['http://is.gd/gk0FoM', 'http://www.wired.com/dangerroom/2012/04/joe-schmoe-drones/'],