Skip to content

Instantly share code, notes, and snippets.

View parkan's full-sized avatar

Arkadiy Kukarkin parkan

View GitHub Profile
javascript:javascript:location.href='https://link.us1.storjshare.io/s/jxcipzkkagperv3nvngya6l64hjq/archive.org/download/' + location.pathname.replace(/\/$/, "").split('/').pop()
@parkan
parkan / path-parser.ts
Last active December 15, 2020 01:24
Path parser middleware for lambda-middleware
// path-parser.ts
import { APIGatewayProxyEvent, APIGatewayProxyResult, Context } from "aws-lambda";
import { Path } from 'path-parser';
type PromiseHandler<TEvent = any, TResult = any> = (
event: TEvent,
context: Context
) => Promise<TResult>;
@parkan
parkan / doh.sh
Created October 6, 2019 21:25
DoH request to eth.link
$ curl -H 'accept: application/dns-message' --output - 'https://eth.link/dns-query?dns=AAEBAAABAAAAAAAAB21hdG9rZW4DZXRoAAAQAAE'
matokenethmatokeneth-,a=0x5A384227B65FA093DEC03Ec34e111Db80A040615matokeneth[Zcontenthash=0xe301017012203a5293e2ada5c0a6c24a23707a7a117a9585e67a01602d8b9626c16debb124f3matokeneth=<dnslink=/ipfs/QmSGKPTuRdhsvQmz2KFMgsNfBFaoxP6QTBVzAFKNuCJKrz
@parkan
parkan / Markdium-Shell.bash
Created October 6, 2019 21:23
Markdium-EthDNS
MOAR
Of course, this use case is only one stepping stone in the transition to first class decentralized web content everywhere. The good news is that the design of EthDNS already supports a few more hops into the future:
on local networks, CoreDNS is a fully featured DNS server, so your conference, meetup, or office can transparently gift ENS+IPNS dweb powers to all visitors by specifying a local EthDNS server in DHCP (we’re going to try setting this up at DevCon 😈)
because EthDNS returns EIP-1577 IPFS CIDs as TXT records in the widely supported DNSLink format, it’s transparently compatible with all existing IPFS tooling, so you can e.g. use it alongside go-ipfs to supplement decentralized naming in IPNS
even if the user isn’t configured for DoH, Dapps can still make requests to the resolution endpoint (we’ve enabled CORS allow), so any app that doesn’t want to rely on MetaMask or need full Ethereum API can use a simple XHR call for ENS resolution
any scenario where running an ethereum client is undesirabl
@parkan
parkan / Markdium-Shell.bash
Created October 6, 2019 21:23
Markdium-EthDNS
$ curl -H 'accept: application/dns-message' --output - 'https://eth.link/dns-query?dns=AAEBAAABAAAAAAAAB21hdG9rZW4DZXRoAAAQAAE'
matokenethmatokeneth-,a=0x5A384227B65FA093DEC03Ec34e111Db80A040615matokeneth[Zcontenthash=0xe301017012203a5293e2ada5c0a6c24a23707a7a117a9585e67a01602d8b9626c16debb124f3matokeneth=
@parkan
parkan / ethdns-for-chrome.sh
Last active October 5, 2020 17:31
How to enable ethdns.xyz ENS-via-DoH in Chrome
# follow instructions in https://www.zdnet.com/article/how-to-enable-dns-over-https-doh-in-google-chrome/
# replacing the parameter string with:
--enable-features="dns-over-https<DoHTrial" --force-fieldtrials="DoHTrial/Group1" --force-fieldtrial-params="DoHTrial.Group1:server/https%3A%2F%2Fethdns.xyz%2Fdns-query/method/POST
14:18:19.162 INFO None a.e.s.Slf4jLogger - Slf4jLogger started
14:18:19.173 DEBUG EventStream(akka://ENSIME) a.e.EventStream - logger log1-Slf4jLogger started
14:18:19.176 DEBUG EventStream(akka://ENSIME) a.e.EventStream - Default Loggers started
14:18:19.232 INFO None o.a.c.v.i.StandardFileSystemManager - Using "/var/folders/d9/5vnzypt501jcr9dhsr4yld5w0000gn/T/vfs_cache" as temporary files store.
14:18:19.324 DEBUG akka://ENSIME/system/IO-TCP/selectors/$a/0 a.i.TcpListener - Successfully bound to /127.0.0.1:54828
14:18:19.328 INFO akka://ENSIME/user/ensime-main/tcp-server o.e.s.t.TCPServer - Bound server on port 54828
14:18:19.329 INFO None o.e.s.PortUtil$ - creating port file: /Users/arkadiy/spotify/works-entity-pipeline/.ensime_cache/port
14:18:19.682 INFO akka://ENSIME/user/ensime-main o.e.s.ServerActor - Environment:
14:18:19.682 INFO akka://ENSIME/user/ensime-main o.e.s.ServerActor - OS : Mac OS X
14:18:19.683 INFO akka://ENSIME/user/ensime-main o.e.s.ServerActor - Java : Java HotSpot(TM) 64-
@parkan
parkan / .hyper.js
Last active April 12, 2017 16:52
hyper
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
@parkan
parkan / privatenet.sh
Last active February 24, 2017 21:46
Creating a privatenet with geth-1.5.2
CCCoinGenesis.json:
{
"nonce": "0x00000000000000cc",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x0",
"gasLimit": "0x8000000",
"difficulty": "0x400",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333"

Keybase proof

I hereby claim:

  • I am parkan on github.
  • I am arkadiy (https://keybase.io/arkadiy) on keybase.
  • I have a public key whose fingerprint is A2BB 2137 4AD8 DC0A 73E8 9F41 C76C C775 46F1 8B4D

To claim this, I am signing this object: