Skip to content

Instantly share code, notes, and snippets.

View palfrey's full-sized avatar

Tom Parker-Shemilt palfrey

View GitHub Profile
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
import csv
import json
import sys
import threading
import urllib.parse
from http.server import HTTPServer, SimpleHTTPRequestHandler
from pathlib import Path
import psycopg2
@palfrey
palfrey / postgres_csv_dump.py
Created June 13, 2023 16:12
Postgres CSV dumper
import json
import sys
import urllib.parse
from pathlib import Path
import psycopg2
url = sys.argv[1]
res = urllib.parse.urlparse(url)
conn = psycopg2.connect(
/* automatically generated by rust-bindgen */
pub const NAPI_VERSION: u32 = 5;
pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub const __bool_true_false_are_defined: u32 = 1;
pub const NAPI_VERSION_EXPERIMENTAL: u32 = 2147483647;
pub const NAPI_MODULE_VERSION: u32 = 1;
pub type wchar_t = ::std::os::raw::c_int;
pub type max_align_t = u128;
@palfrey
palfrey / Cargo.toml
Last active February 29, 2020 23:24
Demo for structopt possible_values issue
[package]
name = "structopt-bug"
version = "0.1.0"
authors = ["Tom Parker-Shemilt <[email protected]>"]
edition = "2018"
[dependencies]
# This works
# structopt = "=0.3.7"
# This doesn't work
@palfrey
palfrey / test.rs
Last active December 31, 2018 11:56
#[test]
#[serial]
fn test_something() {
// rest of your test
}
#[test]
#[serial(db)]
fn test_something_db() {
// do something probably database related
[dev-dependencies]
serial_test = "*"
serial_test_derive = "*"
@palfrey
palfrey / lib.rs
Last active December 31, 2018 11:20
let ast: syn::ItemFn = syn::parse(input).unwrap();
let name = ast.ident;
let block = ast.block;
let attrs = ast.attrs;
let gen = quote! {
#(#attrs)
*
fn #name () {
serial_test::serial_core(#key, || {
#block
03-10 09:30:05.508 22830 22830 D AndroidRuntime: Shutting down VM
03-10 09:30:05.513 22830 22830 E AndroidRuntime: FATAL EXCEPTION: main
03-10 09:30:05.513 22830 22830 E AndroidRuntime: Process: org.moire.opensudoku, PID: 22830
03-10 09:30:05.513 22830 22830 E AndroidRuntime: java.lang.ArrayIndexOutOfBoundsException: length=9; index=-4
03-10 09:30:05.513 22830 22830 E AndroidRuntime: at org.moire.opensudoku.game.CellCollection.setLocation(CellCollection.java:362)
03-10 09:30:05.513 22830 22830 E AndroidRuntime: at org.moire.opensudoku.gui.SudokuPlayActivity$6.onLocationChanged(SudokuPlayActivity.java:519)
03-10 09:30:05.513 22830 22830 E AndroidRuntime: at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:292)
03-10 09:30:05.513 22830 22830 E AndroidRuntime: at android.location.LocationManager$ListenerTransport.-wrap0(Unknown Source:0)
03-10 09:30:05.513 22830 22830 E AndroidRuntime: at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager

Dragon Go Notifier Privacy Policy

Your Dragon Go account details (username, password) are stored on the device you're using the widget on, and we will only share them with Dragon Go Server itself. No other third party services are used. We will contact Dragon Go Server on your behalf to login and list games, but that's it.

Please note that we are therefore subject to the Dragon Go Server privacy policy as listed at http://www.dragongoserver.net/policy.php