Skip to content

Instantly share code, notes, and snippets.

View sime's full-sized avatar
🔒
Trezor

Simon Males sime

🔒
Trezor
View GitHub Profile
https://play.google.com/store/apps/details?id=net.namstudio.android.tool.fillmemory.free
@sime
sime / bookmarklet.js
Created August 3, 2021 10:27
Password generator XKCD #936 + BIP #39
(function () {
const DICTIONARY = ['abandon', 'ability', 'able', 'about', 'above', 'absent', 'absorb', 'abstract', 'absurd', 'abuse', 'access', 'accident', 'account', 'accuse', 'achieve', 'acid', 'acoustic', 'acquire', 'across', 'act', 'action', 'actor', 'actress', 'actual', 'adapt', 'add', 'addict', 'address', 'adjust', 'admit', 'adult', 'advance', 'advice', 'aerobic', 'affair', 'afford', 'afraid', 'again', 'age', 'agent', 'agree', 'ahead', 'aim', 'air', 'airport', 'aisle', 'alarm', 'album', 'alcohol', 'alert', 'alien', 'all', 'alley', 'allow', 'almost', 'alone', 'alpha', 'already', 'also', 'alter', 'always', 'amateur', 'amazing', 'among', 'amount', 'amused', 'analyst', 'anchor', 'ancient', 'anger', 'angle', 'angry', 'animal', 'ankle', 'announce', 'annual', 'another', 'answer', 'antenna', 'antique', 'anxiety', 'any', 'apart', 'apology', 'appear', 'apple', 'approve', 'april', 'arch', 'arctic', 'area', 'arena', 'argue', 'arm', 'armed', 'armor', 'army', 'around', 'arrange', 'arrest', 'arrive', 'arrow', 'art', '
@sime
sime / AppController.php
Created August 27, 2012 21:58
Basic Auth in CakePHP on json request
class AppController extends Controller
{
public $components = array(
'RequestHandler',
'Auth',
);
public function beforeFilter() {
$this->__setupAuth();
@sime
sime / schema.php
Created February 26, 2012 15:01
Possible example of using the CakePHP Schema callback `after` to insert content in the database
<?php
// Possible example of using the CakePHP Schema callback `after`
// to insert content in the database.
// Inspiration: https://github.com/majna/schema
// Copy schema.php to app/Config/Schema
// Run: ./Console/cake schema create
App::uses('ClassRegistry', 'Utility');
class AppSchema extends CakeSchema {
@sime
sime / README.md
Last active October 21, 2023 21:02
Using the Ruby gem bitpay-sdk with BTCPay Server

Using the Ruby gem bitpay-sdk with BTCPay Server

Background

I haven't done Ruby in 5+ years and this reminder to myself how to kick start the bitpay-sdk gem to work with BTCPay Server.

Is this best practise?

No idea.