Skip to content

Instantly share code, notes, and snippets.

@ping
ping / bookmarklet.js
Last active November 21, 2024 04:00
Bookmarklet to add download links for audiobooks in the Overdrive loans page
/* 1. Paste this entire gist over at https://mrcoles.com/bookmarklet/ to generate a bookmarklet */
/* 2. Use a meaningful Name like: 🎧 📖 Links */
/* 3. Drag the generated bookmarklet link to your Bookmarks Toolbar. */
/* 4. Click on the bookmarklet when you're on the Overdrive loan page, e.g. https://yourlibrary.overdrive.com/account/loans */
/* 5. The "Download MP3 audiobook" link should appear like it used to. */
$('a[data-format-id="audiobook-overdrive"]').each(function() {
var listenBtn = $(this);
if (listenBtn.hasClass('script-added')) {
@ping
ping / Program.cs
Created November 30, 2018 03:10
Async Test
using System;
using System.Net.Http;
using System.Threading.Tasks;
public class Program
{
public static void Main()
{
WriteLine("A: Main");
var googleTask = CallGoogleAsync();
{};
@ping
ping / tweet-777915304261193728-compat.json
Created September 20, 2016 07:42
Twitter json samples for extended tweet rollout
{
"contributors": null,
"truncated": true,
"text": "Say more about what's happening! Rolling out now: photos, videos, GIFs, polls, and Quote Tweets no longer count tow\u2026 https://t.co/SRmsuks2ru",
"is_quote_status": false,
"in_reply_to_status_id": null,
"id": 777915304261193728,
"favorite_count": 13856,
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"retweeted": false,
@ping
ping / posmalaysia_tracktrace.py
Created September 19, 2016 07:15
Simple python script to get tracking status from POS Malaysia
import argparse
import re
import json
try:
from urllib2 import urlopen, Request
from urllib import urlencode
except ImportError:
from urllib.request import urlopen, Request
from urllib.parse import urlencode