Skip to content

Instantly share code, notes, and snippets.

View yakkomajuri's full-sized avatar

Yakko Majuri yakkomajuri

View GitHub Profile
3Box is a social profiles network for web3. This post links my 3Box profile to my Github account!
✅ did:muport:QmZHQddnrsKRNFMdZi5JE61Zbv2i62RtHAHYz9ep92DdFK ✅
Create your profile today to start building social connection and trust online. https://3box.io/
pragma solidity^0.5.0;
contract HashCheckpoint {
mapping(address => bytes32) public checkpointHash;
event LogSuccess(bool registered);
function registerHash(bytes32 _latestHash) external {
checkpointHash[msg.sender] = _latestHash;
<style>
#bannerimage {
/* Only mess with this if there is white on the sides - Can lead to scrolling to the left */
width: 103%;
background-image: url(YOUR URL HERE);
/* Play with this for a longer or shorter banner */
height: 600px;
@yakkomajuri
yakkomajuri / birthday_paradox.py
Last active April 20, 2020 23:00
Simple implementation of a program to explain the birthday paradox
from tqdm import trange
from time import sleep
import random
def main():
n_people = int(input())
iterations = int(input())
print("\n\n\n")
matches = 0
for _ in trange(iterations):
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="http://rawgit.com/ethereum/web3.js/0.16.0/dist/web3.min.js"></script>
<script>
if (typeof web3 !== 'undefined') {
web3 = new Web3(web3.currentProvider);
} else {
web3 = new Web3(new Web3.providers.HttpProvider("SUA URL DO NÓ AQUI"));
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>HODL dApp</title>
<style>
$("#button3").click(function(web3) {
var tx = Hodl.definirSenha("\"" + $("#defsenha")[0].value + "\"", {
from: address,
to: "0xEA7128025c3b7c8F230dfB5b7e7C3Ac45158335B",
value: "0",
data: ""
}, function(err, transactionHash) {
if (!err)
console.log(transactionHash);
})
{
"manifest_version": 2,
"name": "LinkedIn AdBlocker",
"description": "Blocking ads.",
"version": "0.0.1",
"author": "<AUTHOR_NAME>",
"browser_action": {
"default_title": "LinkedIn AdBlocker"
},
"permissions": [
function removeAds() {
// Get all 'span' elements on the page
let spans = document.getElementsByTagName("span");
for (let i = 0; i < spans.length; ++i) {
// Check if they contain the text 'Promoted'
if (spans[i].innerHTML === "Promoted") {
// Get the div that wraps around the entire ad
let card = spans[i].closest(".feed-shared-update-v2");
from browser import document, html, window
from javascript import Math
score = 0
high_score = 0
px = py = 10
gs = tc = 20
ax = ay = 15
xv = yv = 0
trail = []