Skip to content

Instantly share code, notes, and snippets.

View mak1986's full-sized avatar

Mak Jacobsen mak1986

  • Bangkok, Thailand
View GitHub Profile
@jdh7190
jdh7190 / unlock.js
Created September 10, 2023 11:14
Unlock from hodlocker
const getUTXO = (rawtx, idx) => {
const bsvtx = new bsv.Transaction(rawtx);
return {
satoshis: bsvtx.outputs[idx].satoshis,
vout: idx,
txid: bsvtx.hash,
script: bsvtx.outputs[idx].script.toHex()
}
}
const getRawtx = async txid => {
var letters = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","i","u","v","w","x","y","z","~","&","|","^","ç","@","]","[","{","}","ù","*","µ","¤","$","£","€","°",")","(","+","-","/","<",">","²","`","é","è","1","2","3","4","5","6","7","8","9","0"];
var activeClass = 'is-active';
var wrapperClass = '.js-text-animate-wrapper';
var stringClass = '.js-text-animate';
var charClass = 'char';
var $string = $(wrapperClass);
$string.each(textScramble);
function characterWrap($el) {
@subfuzion
subfuzion / docker-orientation-for-node-developers.md
Last active April 3, 2023 11:58
Docker Orientation for Node Developers

Docker quick start for Node.js developers

Install Dependencies

Install Docker Toolbox

For Mac and Windows users, just install Docker Toolbox. It provides what you need to get started, including:

@jaceklaskowski
jaceklaskowski / deployment-tool-ansible-puppet-chef-salt.md
Last active January 3, 2024 22:12
Choosing a deployment tool - ansible vs puppet vs chef vs salt

Requirements

  • no upfront installation/agents on remote/slave machines - ssh should be enough
  • application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
  • configuration templating
  • environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
  • deployment process run from Jenkins

Solution

@benshimmin
benshimmin / gist:4088493
Created November 16, 2012 16:03
Scale to fit and centre-align an image with FPDF
<?php
/* Caveat: I'm not a PHP programmer, so this may or may
* not be the most idiomatic code...
*
* FPDF is a free PHP library for creating PDFs:
* http://www.fpdf.org/
*/
require("fpdf.php");
class PDF extends FPDF {