Skip to content

Instantly share code, notes, and snippets.

@joepie91
joepie91 / no-your-cryptocurrency-cannot-work.md
Last active April 13, 2024 03:21
No, your cryptocurrency cannot work

No, your cryptocurrency cannot work

Whenever the topic of Bitcoin's energy usage comes up, there's always a flood of hastily-constructed comments by people claiming that their favourite cryptocurrency isn't like Bitcoin, that their favourite cryptocurrency is energy-efficient and scalable and whatnot.

They're wrong, and are quite possibly trying to scam you. Let's look at why.

What is a cryptocurrency anyway?

There are plenty of intricate and complex articles trying to convince you that cryptocurrencies are the future. They usually heavily use jargon and vague terms, make vague promises, and generally give you a sense that there must be something there, but you always come away from them more confused than you were before.

Create Root Certificate Authority and self-signed certificate for your Home Assistant. Compatible with Chrome browser > version 58 and macOS 10.15 Catalina

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
pnputil /enum-drivers > ./driveroutput.txt
Get-Content .\driveroutput.txt | Select-String -Pattern "Published Name" | %{$_.Line.Split(" ")} | Select-String -Pattern ".inf" | Where { $_ } | Set-Content .\oems.txt
foreach($line in Get-Content .\oems.txt) {
pnputil.exe /delete-driver $line
}
pragma solidity ^0.4.10;
/**
* StromDAO Business Objects
* ====================================================================
* Upper level business objects required for power delivery on a public
* energy distribution system. Defines PowerDelivery as digital asset
* used for transaction data and entities (roles) for master data.
*
* @author Thorsten Zoerner <thorsten.zoerner(at)stromdao.de)
**/
var StromDAONode = new require("./StromDAONode.js");
var node = new StromDAONode.Node({});
// Hole einen GWALink und schreibe einen Messwert
node.gwalink('0xBA2ef7bF8f21218c85c3399025E0d6D63632dc03').then(
function(gwalink) {
var reader_in = gwalink.reader_in;
var reader_out = gwalink.reader_out;
var myReading=new Date().getTime();
@roylee0704
roylee0704 / dockergrep.sh
Created December 9, 2016 08:24
how to grep docker log
docker logs nginx 2>&1 | grep "127."
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container
@zoernert
zoernert / microdao.abi
Last active June 19, 2017 10:13
Micro DAO to create an EVU in Germany
[ { "constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string", "value": "MicroDAO" } ], "type": "function" }, { "constant": false, "inputs": [], "name": "executeSpendingRequests", "outputs": [], "type": "function" }, { "constant": false, "inputs": [ { "name": "number_of_days", "type": "uint256" }, { "name": "requiredShares", "type": "uint256" } ], "name": "setDirectorLock", "outputs": [], "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "uint256" } ], "name": "bookings", "outputs": [ { "name": "time", "type": "uint256" }, { "name": "funding", "type": "uint256" }, { "name": "spending", "type": "uint256" }, { "name": "counterpart", "type": "address" }, { "name": "text", "type": "string" } ], "type": "function" }, { "constant": false, "inputs": [], "name": "closeFunding", "outputs": [], "type": "function" }, { "constant": false, "inputs": [ { "name": "node", "type": "string" } ], "name": "setDirectorNode", "outputs": [], "type": "function" }, { "consta
@seanbehan
seanbehan / upload-files-with-flask.md
Last active June 4, 2018 21:08
upload files to s3 with flask, PIL and tinys3

HTML form for file uploads

<!-- in templates/form.html -->
<form action="/upload" method="POST" enctype="multipart/form-data">
 <input type="file" name="logo">
 <button>Upload</button>
</form>
@tanyuan
tanyuan / smart-caps-lock.md
Last active May 3, 2024 08:19
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.