Skip to content

Instantly share code, notes, and snippets.

View masterial's full-sized avatar
:atom:

Konstantin Yurchenko, Jr. masterial

:atom:
View GitHub Profile
http://swarm-gateways.net/bzz:/<hash>
http://swarm-gateways.net/bzz:/theswarm.eth/
ensutils-testnet.js from the ENS repo: https://github.com/ethereum/ens/blob/master/ensutils-testnet.js
then it is:
geth \
--preload 'ensutils-testnet.js' \
--exec 'publicResolver.setContent(namehash("lmars.eth"), "0x<hash>", {from: eth.accounts[0]})' \
attach
@masterial
masterial / swarm-api-improvements.md
Created June 16, 2017 16:08 — forked from lmars/swarm-api-improvements.md
Swarm API improvements

Uploading files

Files can be uploaded in a single HTTP request, where the body is either a single file to store, a tar stream (application/x-tar) or a multipart form (multipart/form-data).

  • single file upload
$ curl -H "Content-Type: text/plain" --data-binary "some-data" http://localhost:8500/bzz:/
69094f7a9a04d680708596d1c0b67b0852d72d91bbaf934206c0904137c5a3c7
@masterial
masterial / nginx.conf
Created June 25, 2017 22:48 — forked from micho/nginx.conf
nginx config for http/https proxy to localhost:3000
First, install nginx for mac with "brew install nginx".
Then follow homebrew's instructions to know where the config file is.
1. To use https you will need a self-signed certificate: https://devcenter.heroku.com/articles/ssl-certificate-self
2. Copy it somewhere (use full path in the example below for server.* files)
3. sudo nginx -s reload
4. Access https://localhost/
Edit /usr/local/etc/nginx/nginx.conf:
@masterial
masterial / simple-nodejs-iv-encrypt-decrypt.js
Created August 7, 2017 03:28 — forked from yoavniran/simple-nodejs-iv-encrypt-decrypt.js
nodejs crypto - simple encrypt & decrypt using IV (Initialization Vector)
"use strict";
var crypto = require("crypto");
var EncryptionHelper = (function () {
function getKeyAndIV(key, callback) {
crypto.pseudoRandomBytes(16, function (err, ivBuffer) {
var keyBuffer = (key instanceof Buffer) ? key : new Buffer(key) ;
@masterial
masterial / Jobs_and_ecs.cs
Created February 27, 2018 22:40 — forked from valyard/Jobs_and_ecs.cs
"Slides" about C# Job System and ESC in Unity.
// ######################################################################
//
// We want you to write more efficient code
//
// ######################################################################
But, we teach the opposite...
You know, GameObjects and Components.
...
@masterial
masterial / raiden_aws_ubuntu.sh
Last active March 23, 2018 23:01 — forked from shigahi/raiden_aws_ubuntu.sh
AWS + Ubuntu + Parity + Raiden
#!/bin/sh
sudo apt-get update
# install dependencies and npm 依存パッケージとnpmのインストール
sudo apt-get install build-essential automake pkg-config libtool libffi-dev libgmp-dev libwww-perl nodejs npm python3-pip python-pip -y
sudo npm install -g n
sudo n latest
sudo npm i npm@4 -g
@masterial
masterial / gist:463f9e00f1350ddd692f925124803ca0
Last active September 29, 2023 21:11
Lost Funds Recovery Procedure
from bs4 import BeautifulSoup
# Your HTML snippet
html = """
<!DOCTYPE html>
<!-- (Your HTML here) -->
</html>
"""
# Parse HTML using BeautifulSoup