Skip to content

Instantly share code, notes, and snippets.

View tiero's full-sized avatar
🚀
Shipping

Marco Argentieri tiero

🚀
Shipping
View GitHub Profile
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@getify
getify / gist:7325764
Last active October 26, 2023 04:04
converting between Uint8Arrays and binary-encoded strings and word-arrays (for crypto purposes, with CryptoJS and NaCL)
/*
wordArray: { words: [..], sigBytes: words.length * 4 }
*/
// assumes wordArray is Big-Endian (because it comes from CryptoJS which is all BE)
// From: https://gist.github.com/creationix/07856504cf4d5cede5f9#file-encode-js
function convertWordArrayToUint8Array(wordArray) {
var len = wordArray.words.length,
u8_array = new Uint8Array(len << 2),
offset = 0, word, i
@fanatid
fanatid / bitcoinjs-lib.js
Last active March 28, 2019 21:49
bitcoin multisig transaction demo
var bitcoin = require('bitcoinjs-lib') // 1.4.x ?
var privKeys = [
'L2ALJznyt2croGHs8duBK2TZMB3Bc5ZpFZQSmR5QQUMPDDcUWeTw', // n2t8F1D41xy6f3d2B6DtjXRRsn8dgUzQ6C
'L3gM5giJqPAJcWyD8eKv94d4QgqyzqrYeAA9DnuJe23FszsnqD1w', // mjgF67B4pyEHuGTLU5jS333EasUrZBaxMB
'KwdYxYAbxntKvrMQtDHAamPT1pyuYkDRfAwESBqCGRdz9abQo3dW', // mwzPpNMFwLoJPXw2ez8mz6RrdYGaqZDind
'L5LTWMRBt27dHde1mnvV1RzW1mxQuQBxpm2TvNHsMaNvAQKqKov2', // mt7K2ChnJSp96k93HYdC8B9oqUmqLyESpL
'L4qQgxEbKJFJKans2UxFRzXisS7o3oBkyJGirAUgTxS9CfTo9Cd4', // mmvbfVqYrXdy1i4x9UzWc4PtgN7VjMNjeY
]
@EvgenyOrekhov
EvgenyOrekhov / A simple Docker and Docker Compose install script for Ubuntu.md
Last active July 23, 2024 13:28
A simple Docker and Docker Compose install script for Ubuntu

A simple Docker and Docker Compose install script for Ubuntu

Usage

  1. sh install-docker.sh
  2. log out
  3. log back in

Links

@bretton
bretton / improved-lnd-bitcoind-mainnet.md
Last active June 26, 2024 16:08
Detailed guide to installing LND and Bitcoind on Ubuntu 16.04 LTS for Mainnet

Intro

This guide is specific to getting LND 0.5-beta and Bitcoind running on Ubuntu 16.04 LTS for mainnet. It is aging rapidly and includes steps not necessary on newer versions of LND. As of April 2021 it is very out of date for bitcoind. As of December 2021 it is outdated for LND too.

Original installation guide:

This guide is broken into the following sections:

  • Install bitcoind and set to start automatically
  • Install development tools and dependancies
@bitPico
bitPico / gist:904352bd356baff866093de57c8caa23
Created June 27, 2018 03:43
Bitcoin ABC Large Block ZeroDay Vulnerability - 01
static bool ConnectBlock(const Config &config, const CBlock &block,
CValidationState &state, CBlockIndex *pindex,
CCoinsViewCache &view, bool fJustCheck = false) {
==> AssertLockHeld(cs_main);
// ...
==> if (!control.Wait()) {
return state.DoS(100, false, REJECT_INVALID, "blk-bad-inputs", false,
@coreyphillips
coreyphillips / rn-bitcoinjs-lib-4.0.1_Setup.md
Last active March 12, 2019 16:44
How To Add bitcoinjs-lib Version 4.0.1 To A React Native Project

Newer version available. Please see 4.0.2

How To Add bitcoinjs-lib Version 4.0.1 To A React Native Project

Add/Link the following dependencies:

  • yarn add bitcoinjs-lib@4.0.1 react-native-randombytes buffer-reverse buffer@5
  • yarn add --dev rn-nodeify
  • react-native link react-native-randombytes
  • Add the following postinstall to your script in package.json: "postinstall": "rn-nodeify --install buffer,stream,assert,events,crypto,vm --hack"
@tiero
tiero / Dockerfile
Created November 17, 2018 00:39
bitcoin-liquid-docker
# Download base image ubuntu 16.04
FROM ubuntu:16.04
# Update Ubuntu Software repository
RUN apt-get update && apt-get install -y python-software-properties && apt-get install -y software-properties-common
# Bitcoin PPA
RUN apt-add-repository ppa:bitcoin/bitcoin
# Update Ubuntu Software repository
RUN apt-get update
@AdamISZ
AdamISZ / SNICKER_BIP_draft.mediawiki
Last active April 3, 2023 20:09
SNICKER BIP draft


  BIP&#58; ??
  Layer&#58; Applications
  Title&#58; SNICKER &#45; Simple Non&#45;Interactive Coinjoin with Keys for Encryption Reused
  Author&#58; Adam Gibson <AdamISZ@protonmail.com>
  Comments&#45;Summary&#58; No comments yet.
  Comments&#45;URI&#58; &#45;
  Status&#58; Proposed
  Type&#58; Informational
  Created&#58; &#45;

See video: https://youtu.be/kTl-y6_6z_A

DEXchain

Presenting a bitcoin sidechain with on-chain utility of hedging price risk of future coinbase cashflows for bitcoiner miners.

Futures Contracts

Futures contracts are agreements to buy a specific commodity or asset at a specific price and time in the future. Since the actual transaction does not happen until the settlement date, the buyer does not have to pay the seller until that time. At the end of the futures contract, the buyer must pay the seller the agreed upon price, and the seller must "deliver" the commodity to the buyer.

However, before delivery time, the buyer (or seller), can close the contract by selling (or buying) to somebody else. Assuming the price of the futures contracts trade relative to the underlying commodity, these can be used to hedge risk in the underlying commodity, or to speculate with leverage.