Skip to content

Instantly share code, notes, and snippets.

/* usbreset -- send a USB port reset to a USB device
*
* Compile using: gcc -o usbreset usbreset.c
*
*
* */
@x2q
x2q / curl-h3.sh
Created September 18, 2023 19:49 — forked from sinwoobang/curl-h3.sh
Install curl supporting HTTP/3 on Apple Silicon
# Referred to https://dev.to/gjrdiesel/installing-curl-with-http3-on-macos-2di2
# Clean up any old version of curl you may have already tried to install
brew remove -f curl
# Download the curl ruby install script provided by cloudflare
curl -O https://gist.githubusercontent.com/sinwoobang/bfc7cc8d4d38157bde064fc2ccb60c64/raw/bf55b7c6af9ed06d2cd909ea167a69948a800e7d/curl.rb
# Install curl via that script from the latest git repos
brew install --HEAD -s curl.rb
#! /bin/bash
#
# Copyright(c) 2011-2013 Brother Industries, Ltd.
# All Rights Reserved.
#
#Brother retains any and all copyrights to the Software.
#In no case this Agreement shall be construed to assign
#or otherwise transfer from Brother to User any copyrights
#or other intellectual property rights to whole or any part
#of the Software.
@x2q
x2q / netradio.opml
Last active October 13, 2019 12:21
<?xml version="1.0" encoding="UTF-8" ?>
<opml version="1.1">
<head><title>Dansk Radio HD</title><ownerEmail>x2q@x2q.net</ownerEmail></head>
<body>
<outline text="DR Netradio">
<outline type="audio" text="DR P1" url="http://live-icy.gss.dr.dk/A/A03H.mp3.m3u" />
<outline type="audio" text="DR P2 Klassisk" url="http://live-icy.gss.dr.dk/A/A04H.mp3.m3u" />
<outline type="audio" text="DR P3" url="http://live-icy.gss.dr.dk/A/A05H.mp3.m3u" />
<outline type="audio" text="DR P4 Østjylland" url="http://live-icy.gss.dr.dk/A/A14H.mp3.m3u" />
<outline type="audio" text="DR P5" url="http://live-icy.gss.dr.dk/A/A25H.mp3.m3u" />
@x2q
x2q / vereq.xml
Created November 20, 2012 08:09
Visa 3D Secure VEReq/VERes Examples
<?xml version="1.0" encoding="UTF-8"?>
<ThreeDSecure>
<Message id="999">
<VEReq>
<version>1.0.2</version>
<pan>4444333322221111</pan>
<Merchant>
<acqBIN>411111</acqBIN>
<merID>99000001</merID>
<password>99000001</password>
@x2q
x2q / crreq.xml
Created November 21, 2012 08:34
Visa 3D Secure CRReq/CRRes Examples
<?xml version="1.0" encoding="UTF-8"?>
<ThreeDSecure>
<Message id="999">
<CRReq>
<version>1.0.1</version>
<pan>4444333322221111</pan>
<Merchant>
<acqBIN>411111</acqBIN>
<merID>99000001</merID>
<!--<password>99000001</password>-->
links "http://www.google.dk/search?q=MasterCard+"merID"+ThreeDSecure"
@x2q
x2q / wd-live-s3-backup.sh
Last active February 19, 2018 00:29
WD My Book Live Duplicity Back Up To Amazon S3 (and Glacier). See this blog post for more info: http://www.x2q.net/blog/2013/02/24/howto-backup-wd-mybook-live-to-amazon-s3-and-glacier/
#!/bin/sh
# WD Live Duplicity Back Up To Amazon S3 (and Glacier)
#
# Requires python-boto, duplicity, util-linux, and trickle to be installed
# Install using: apt-get install python-boto duplicity util-linux trickle
#
# See this blog post for more info:
# http://www.x2q.net/blog/2013/02/24/howto-backup-wd-mybook-live-to-amazon-s3-and-glacier/
#!/usr/bin/env ruby -w
require 'net/http'
require 'net/https'
require 'openssl'
require 'uri'
DIR = File.dirname(__FILE__)
uri = URI.parse("https://test.directory.securecode.com:443/")
@x2q
x2q / Gemfile
Created December 1, 2012 09:55
simple and fast Ruby/Rack/Thin setup for a serving static html site with ssl support
source :rubygems
gem 'rack-contrib'
gem 'thin'
gem 'rack-ssl-enforcer'