Skip to content

Instantly share code, notes, and snippets.

View EpicVoyage's full-sized avatar
🗺️

Chris EpicVoyage

🗺️
View GitHub Profile
/**
* Shared in the hope that this will be useful to others who need USB serial numbers in Windows. This should be valid
* for Windows 2000, XP, Vista, 7.
*
* It is possible for USB devices to not have a serial number. When that happens Windows assigns one based on the bus
* that the device is attached to. I do not have a thumb drive like that to test it with, but others have said that when
* the second character of the “serial” is an ampersand that it means the device does not have a serial number. This
* code does not test for it.
*/
int NextDevice(DWORD *index, TCHAR *drive, TCHAR *serial, DWORD szs, TCHAR *parentidprefix, DWORD szpip)
@EpicVoyage
EpicVoyage / Credit Card Generator
Last active June 15, 2020 13:33 — forked from B-Con/Credit Card Generator
This JavaScript function generates random number strings that pass the Luhn checksum, the test that credit card numbers must conform to. It assumes there is an HTML radio input to indicate which company issued the card. This code is from my webpage here: http://bradconte.com/cc_generator.html.
// Copyright (c) 2015, Brad Conte (http://bradconte.com)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
@EpicVoyage
EpicVoyage / vindecoder.js
Created June 12, 2020 20:35 — forked from kevboutin/vindecoder.js
Decode a VIN
/**
* VIN decoder.
*
* kevinboutin on 3/11/18.
*
* My VIN for testing is WBA3A5G59DNP26082 so use the following command to invoke:
* node vindecoder WBA3A5G59DNP26082
*
* Examples:
* KM8JM12D56U303366
@EpicVoyage
EpicVoyage / readweb.pl
Created December 10, 2017 19:10
Read a web page aloud with Perl, Festival and MPlayer
#!/usr/bin/perl -w
use HTML::Feature;
use PerlSpeak;
my $f = HTML::Feature->new(enc_type => 'utf8');
my $url = shift;
print "Fetching ${url}\n";
my $result = $f->parse($url);
@EpicVoyage
EpicVoyage / createuser.php
Created December 10, 2017 18:48
Expression Engine 2: User Creation Script
<?php
/**
* Usage: Drop in the system/ folder, then open in your browser.
*/
# Define your login details.
$user = 'epicvoyage';
$pass = 'epicvoyage';
$email = 'chris@epicvoyage.org';
$url = 'https://www.epicvoyage.org';