Skip to content

Instantly share code, notes, and snippets.

@ritzdorf
ritzdorf / EIP1884.md
Last active September 27, 2022 12:03
Recently Executed Transactions affected by EIP1884

Recently Executed Contracts with Issues in EIP 1884

EIP 1884 is set to be implemented into the upcoming Ethereum 'Istanbul' hard fork. It

  • increases the cost of opcode SLOAD from 200 to 800 gas
  • increases the cost of BALANCE and EXTCODEHASH from 400 to 700 gas
  • adds a new opcode SELFBALANCE with cost 5.
@johncantrell97
johncantrell97 / satoshistreasure.md
Last active April 15, 2023 15:09
How I Obtained Satoshi's Treasure Keys 1, 2, and 3 in Minutes

Today (April 16th 2019 at noon) the first major clues to discover key #1 was set to be released in a few cities. A QR code with the words 'orbital' were found at these locations and looked like this: (https://imgur.com/a/6rNmz7T). If you read the QR code with your phone you will be directed to this url: https://satoshistreasure.xyz/k1

At this URL you are prompted to input a passphrase to decrypt the first shard. An obvious first guess was to try the word 'orbital' from the QR code. Not suprisingly this worked! This reveals a congratulations page and presents the first key shard:

ST-0001-a36e904f9431ff6b18079881a20af2b3403b86b4a6bace5f3a6a47e945b95cce937c415bedaad6c86bb86b59f0b1d137442537a8.

Now, we were supposed to wait until April 17th to get clues from the other cities for keys #2 and #3 but that wouldn't stop me from digging around with all the new information we had. All that time "playing" notpron (http://notpron.org/notpron/) years ago was going to help me here.

The first thing I noticed was

@hclivess
hclivess / veriblock_scam
Created March 29, 2019 07:12
veriblock is a CIA scam
from blockchain import blockexplorer
from difflib import SequenceMatcher
def similar(a, b):
return SequenceMatcher(None, a, b).ratio()
def compare (forked_shitcoin_hashes):
winner = None
shitcoin_race_winner = 0
@0age
0age / MetamorphicContractInitCode.txt
Last active May 24, 2023 10:24
Metamorphic Contract Initialization Code
* @title Metamorphic Contract
* @author 0age, derived from cloner contract by @mhswende
* @notice This contract will create a metamorphic contract, or an upgradeable
* contract that does not rely on a transparent proxy, when deployed using
* CREATE2. It expects the deployer to provide a getImplementation() function
* that will return an implementation address, which it will then clone and
* deploy. Unlike with upgradeable transparent proxies, the state of a
* metamorphic contract will be wiped clean with each upgrade. With great power
* comes great responsibility - implement appropriate controls and educate the
* users of your contract if it will be interacted with!
@harding
harding / bitcoin-fediverse-best-practices.md
Created August 8, 2018 17:50
Suggestions for how to best get along with other Bitcoiners on the Fediverse (Mastodon/GNU Social/Pleroma/ActivityPub/Etc)

Price toots

Some people really don't want to hear about the price! But this is other people's favorite topic. If you adhear to the following two rules whenever talking about price, or something related to the price like altcoin prices, we should all be able to continue interacting about our common interests in Bitcoin:

  1. Use a Content Warning (the CW in the Mastodon user interface) to allow people to opt-into seeing your price-related information and images. Note that replies to CW-content are also automatically wrapped in the same CW.
anonymous
anonymous / TweetRegistry.sol
Created June 29, 2017 21:56
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.11+commit.68ef5810.js&optimize=undefined&gist=
pragma solidity ^0.4.9;
/*
decentralized microblogging
Copyright (C) 2015 Jahn Bertsch
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation in version 3.
This program is distributed in the hope that it will be useful,
@alexvandesande
alexvandesande / How to interact with the Dogecoin Bounty DAO
Created December 29, 2015 12:00
This is a contract that manages bounties donated by the community to be donated to people who worked sucessfully on projects related to dogecoin-ethereum integration. It's a member vote.
This is a contract that manages bounties donated by the community to be donated to people who worked sucessfully on
projects related to dogecoin-ethereum integration. It's a member vote.
1) Download the latest Ethereum Wallet: https://github.com/ethereum/mist/releases/tag/0.3.7
2) Open it, let it sync and then create a new account
3) If you don't have any ether and isn't a member of the DAO, contact alex: avsa@ethdev.
4) Go to the 'contracts' tab and then 'watch contract'. Add the address and interface abi of the contract as shown here: https://gist.github.com/alexvandesande/eb6935702e2549d1e510
Address: 0xdbf03b407c01e7cd3cbea99509d93f8dddc8c6fb
ABI:
[ { "constant": true, "inputs": [ { "name": "", "type": "uint256", "typeShort": "uint", "bits": "256", "displayName": "", "template": "elements_input_uint", "value": "" } ], "name": "proposals", "outputs": [ { "name": "recipient", "type": "address" }, { "name": "amount", "type": "uint256" }, { "name": "description", "type": "string" }, { "name": "votingDeadline", "type": "uint256" }, { "name": "executed", "type": "bool" }, { "name": "proposalPassed", "type": "bool" }, { "name": "numberOfVotes", "type": "uint256" }, { "name": "currentResult", "type": "int256" }, { "name": "proposalHash", "type": "bytes32" } ], "type": "function", "displayName": "proposals" }, { "constant": false, "inputs": [ { "name": "proposalNumber", "type": "uint256", "typeShort": "uint", "bits": "256", "displayName": "proposal Number", "template": "elements_input_uint" }, { "name": "transactionBytecode", "type": "bytes", "typeShort": "bytes", "bits": "", "displayName": "tra
@rupakraj
rupakraj / format_nepali_money
Created July 13, 2014 03:11
Php function to format the money in Rs. (Nepali)
function money_format_nep($number, $is_unicode=true)
{
//number_format($number,".");
if(strstr($number,"-"))
{
$number = str_replace("-","",$number);
$negative = "-";
}
@alishutc
alishutc / gist:a6b1b0fc11a28a627897
Last active November 23, 2023 19:30
Play a random embedded youtube video
<!DOCTYPE html>
<html>
<head>
<script>
var videos = ["https://www.youtube.com/embed/9bZkp7q19f0", "https://www.youtube.com/embed/dQw4w9WgXcQ"];
window.onload = function () {
var playerDiv = document.getElementById("random_player");
var player = document.createElement("IFRAME");
var randomVideoUrl = videos[Math.floor(Math.random() * videos.length)];