Skip to content

Instantly share code, notes, and snippets.

View elliotwms's full-sized avatar
🏴󠁧󠁢󠁷󠁬󠁳󠁿

Elliot Williams elliotwms

🏴󠁧󠁢󠁷󠁬󠁳󠁿
View GitHub Profile
const { sha256 } = require('js-sha256').sha256;
class Miner {
constructor(fnHash, difficulty = 1, maxAttempts = 1000, verbose = true) {
if (difficulty <= 0 || difficulty > 5) {
throw new Error('Invalid difficulty provided');
}
this.fnHash = fnHash;
this.maxAttempts = maxAttempts;
@eddturtle
eddturtle / counties.csv
Last active June 14, 2017 08:32
uk + ireland postal counties list (in json, csv, xml)
1 Aberdeenshire
2 Angus
3 Argyll and Bute
4 Bath and North East Somerset
5 Bedfordshire
6 Berkshire
7 Blaenau Gwent
8 Bridgend
9 Buckinghamshire
10 Caerphilly
@johnkary
johnkary / WSSoapClient.php
Created June 27, 2012 20:08
WS-Security for PHP SoapClient
<?php
/**
* Copyright (c) 2007, Roger Veciana
* 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
@ksafranski
ksafranski / Common-Currency.json
Last active April 22, 2024 15:16
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},