Skip to content

Instantly share code, notes, and snippets.

View kynan's full-sized avatar
💭
I may be slow to respond and only triage notifications irregularly

Florian Rathgeber kynan

💭
I may be slow to respond and only triage notifications irregularly
View GitHub Profile
@tadwohlrapp
tadwohlrapp / export-google-podcasts-listening-history-readme.md
Last active August 9, 2024 18:32
How to Export Google Podcasts listening history

How to Export your Google Podcasts listening history

Since Google doesn't provide any method to export or download your listening history, I wanted to find a way to preserve that data for later reference when setting up a new podcast app. I came up with the following script that can be run in your browser console to retrieve and export your Google Podcasts listening history as a CSV file.

NEVER RUN CODE YOU DON'T UNDERSTAND.

Running untrusted code in your browser console can potentially be harmful, so it's important to understand what the code does before executing it. I've included comments in the code to explain its functionality.

Instructions:

Rusty's API Design Manifesto

The idea

Application Programming Interface (API) design is hard. But it's even harder to change once you get it wrong. So what you should do is to spend the effort to get it right the first time around.

In the Linux Kernel community Rusty Russell came up with a API rating scheme to help us determine if our API is sensible, or not. It's a rating from -10 to 10, where 10 is perfect is -10 is hell. Unfortunately there are too many examples at the wrong end of the scale.

Rusty's original descriptions

@jnhansen
jnhansen / xr_auto_merge.py
Created August 3, 2018 18:59
Auto-merge xarray datasets along multiple dimensions
import glob
import xarray as xr
import itertools
import numpy as np
def auto_merge(datasets):
"""
Automatically merge a split xarray Dataset. This is designed to behave like
`xarray.open_mfdataset`, except it supports concatenation along multiple
@Lewiscowles1986
Lewiscowles1986 / FindJemalloc.cmake
Created January 15, 2017 16:35
Find Jemalloc library (CMake)
#
# Find the JEMALLOC client includes and library
#
# This module defines
# JEMALLOC_INCLUDE_DIR, where to find jemalloc.h
# JEMALLOC_LIBRARIES, the libraries to link against
# JEMALLOC_FOUND, if false, you cannot build anything that requires JEMALLOC
# also defined, but not for general use are
@alysonla
alysonla / active-issues.sql
Last active September 19, 2023 11:21
Queries that power the open source section of the 2016 Octoverse report https://octoverse.github.com/2016/
-- Active issues
-- Count of total active issues in the specified time frame
-- Source: githubarchive public data set via Google BigQuery http://githubarchive.org/
SELECT
COUNT(DISTINCT JSON_EXTRACT_SCALAR(events.payload, '$.issue.id')) AS events_issue_count
FROM (SELECT * FROM TABLE_DATE_RANGE([githubarchive:day.],TIMESTAMP('2015-09-01'),TIMESTAMP('2016-08-31')))
AS events
-- 10,723,492 active issues
@lfigueira
lfigueira / bng_to_latlon.py
Last active March 24, 2021 11:14
Python script to convert British National grid coordinates (OSGB36 Eastings, Northings) to WGS84 latitude and longitude. The code from this script was copied/adapted from Hannah Fry's blog; the original code and post can be found here: http://www.hannahfry.co.uk/blog/2012/02/01/converting-british-national-grid-to-latitude-and-longitude-ii, toghe…
#
# Converts eastings and northings (British national grid coordinates) to Lat/Long
#
# Original code author: Hannah Fry; see code/comments here:
# http://www.hannahfry.co.uk/blog/2012/02/01/converting-british-national-grid-to-latitude-and-longitude-ii
#
from math import sqrt, pi, sin, cos, tan, atan2 as arctan2
import csv
@juarezpaf
juarezpaf / create-extraordinary-apps-with-firebase.md
Created November 14, 2015 14:45
Firebase Adventures Codelab
@mrchrisadams
mrchrisadams / readme.md
Last active January 16, 2016 14:27
UK govcamp slackin notes

In case Chris gets hit by a bus

There's now a [an online slack community for UK Gov Camp][1], available at the link below in huge letters:

That's nice! How get people into it?

There are a few ways people can join:

/**
* Access Token
*/
_.extend(AccessToken, {
/**
* Update an access token
* @param {Function} callback Callback when token has been updated
*/
refreshAccessToken : function(service, force, callback) {
/**
@pinski1
pinski1 / BasicGroundStation.ino
Last active September 28, 2015 06:43
Basic sketches to send and receive VGA camera images (as jpgs) via an RFM22 radio.
// rf22_server.pde
// -*- mode: C++ -*-
// Example sketch showing how to create a simple messageing server
// with the RH_RF22 class. RH_RF22 class does not provide for addressing or
// reliability, so you should only use RH_RF22 if you do not need the higher
// level messaging abilities.
// It is designed to work with the other example rf22_client
// Tested on Duemilanove, Uno with Sparkfun RFM22 wireless shield
// Tested on Flymaple with sparkfun RFM22 wireless shield
// Tested on ChiKit Uno32 with sparkfun RFM22 wireless shield