Skip to content

Instantly share code, notes, and snippets.

View dakk's full-sized avatar
Working from boat

Davide Gessa dakk

Working from boat
View GitHub Profile
[477234.004522] [Hardware Error]: Corrected error, no action required.
[477234.010885] [Hardware Error]: CPU:1 (19:21:0) MC19_STATUS[Over|CE|MiscV|AddrV|-|SyndV|CECC|-|Poison|Scrub]: 0xdc63493576e03944
[477234.022525] [Hardware Error]: Error Addr: 0x0000000000000000
[477234.028351] [Hardware Error]: IPID: 0x0000000000000000, Syndrome: 0x0000000000000000
[477234.036292] [Hardware Error]: Coherent Slave Ext. Error Code: 32
[477234.036294] [Hardware Error]: cache level: RESV, tx: DATA
[538346.980302] kernel BUG at net/core/skbuff.c:3013!
[538346.985174] invalid opcode: 0000 [#1] SMP NOPTI
[538346.989856] CPU: 0 PID: 0 Comm: swapper/0 Tainted: P O 5.15.104-1-pve #1
[538346.998059] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./B550D4U-2T, BIOS L0.05E 07/26/2021
@dakk
dakk / tezos-baking-howto.md
Last active March 6, 2022 21:22
tezos-baking-howto.md

Tezos baking howto

This howto is valid for Betanet on Ubuntu or Debian

Setup

Prereq

You have to install some dependencies. In debian / ubuntu run:

open Qiskit
(* Create the circuit *)
let qc = quantum_circuit 2 2
|> h 0
|> id 1
|> barrier
|> cx 0 1
|> barrier
|> measure 0 0
@dakk
dakk / yallo_medium_1_deploy.yallo
Last active July 7, 2020 12:44
yallo_medium_1_deploy.yallo
import "Token.yallo";
contract deployAToken {
field tokenAddress: address;
entry deployToken() {
let (a: address, op: operation) = Tezos.createContract (Token(Tezos.selfAddress(), 100, "ourToken"), None, 0);
this.tokenAddress = a;
[op]
}
@dakk
dakk / yallo_medium_1_using.yallo
Created July 7, 2020 12:41
yallo_medium_1_using.yallo
import "IToken.yallo";
const tokenContractAddress: address = @KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq;
contract usingAToken {
field bal: nat;
entry checkBalance(a: address) {
[IToken.of(tokenContractAddress).getBalance(a, this.checkBalanceCallback)]
}
@dakk
dakk / yallo_medium_1_contract.yallo
Created July 7, 2020 12:41
yallo_medium_1_contract.yallo
contract Token implements IToken {
field balances: (address, nat) big_map;
field totalSupply: nat;
field symbol: string;
constructor (owner: address, supply: nat, symbol: string) {
this.balances = [ { owner: supply } ];
this.totalSupply = supply;
this.symbol = symbol;
}
@dakk
dakk / yallo_medium_1_interface.yallo
Created July 7, 2020 12:40
yallo_medium_1_interface.yallo
interface IToken {
entry transfer(from: address, to: address, val: nat);
view getBalance(ad: address): nat;
}
@dakk
dakk / squash-commits.md
Created May 14, 2019 15:07 — forked from longtimeago/squash-commits.md
How to squash commits in a GitHub pull request

How to squash commits in a GitHub pull request

o you've contributed some code to an open source project, say, Rails. And they'd like you to squash all of the commits in your pull request. But you're not a git wizard; how do you make this happen?

Normally, you'd do something like this. I'm assuming upstream is a git remote that is pointing at the official project repository, and that your changes are in your 'omgpull' branch:

@dakk
dakk / liskcmdms.sh
Created April 10, 2019 07:52
lisk-commander: create and sign a multisig transaction
# Install lisk-commander
$ sudo npm install --global --production lisk-commander
# Transaction creation
$ lisk transaction:create -t transfer 100 ADDRESSL
? Please enter your secret passphrase: [hidden]
? Please re-enter your secret passphrase: [hidden]
{"amount":"10000000000","recipientId":"XXXL","senderPublicKey":"XX","timestamp":123,"type":0,"fee":"10000000","asset":{},"signature":"XX","id":"123"}
# Broadcast the multisig tx
@dakk
dakk / address.js
Last active March 26, 2018 14:58
Mastering Bitcoin - Chapter 4
// First install bitcoinjs-lib and bip39 in the current working directory
// npm install bitcoinjs-lib bip39
const bitcoin = require ('bitcoinjs-lib');
const bip39 = require ('bip39');
/// Generate a random keypair and display private and public key and the address (compressed by default)
let keypair = bitcoin.ECPair.makeRandom ();
console.log ('Address:', keypair.getAddress());