Skip to content

Instantly share code, notes, and snippets.

View freeatnet's full-sized avatar
🕊️
make trustless systems not war

Arseniy Ivanov freeatnet

🕊️
make trustless systems not war
View GitHub Profile
.route-home .stream-item .OldMedia,
.route-home .stream-item .AdaptiveMedia {
margin-top: 0;
}
.route-home .stream-item .OldMedia:before,
.route-home .stream-item .AdaptiveMedia:before {
display: inline-block;
content: '[Image hidden]';
}
.route-home .stream-item .OldMedia-container,
@freeatnet
freeatnet / stylish.css
Created July 14, 2016 03:33
Twitter style: Clapping hands really clap
.stream-item img.Emoji.Emoji--forText[title^="Clapping hands sign"], .js-tweet-text-container img.Emoji.Emoji--forText[title^="Clapping hands sign"] {
animation: blink-animation 1s steps(5, start) infinite;
}
.stream-item:hover img.Emoji.Emoji--forText[title^="Clapping hands sign"], .js-tweet-text-container:hover img.Emoji.Emoji--forText[title^="Clapping hands sign"] {
animation: initial;
visibility: visible;
}
@keyframes blink-animation {
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
@freeatnet
freeatnet / 1-steps-to-reproduce.md
Last active September 19, 2018 11:57
A a reproducible deadlock in Rails 5.1.2
  1. Have a Rails 5.1.2 app (db=pg (0.20.0), server=puma (3.9.1)) with some models and RESTful endpoints for fetching them.
  2. Have a data-hungry frontend app that launches 5 requests to those endpoints at once (while including Content-Type: application/json in the requests, causing parameter wrapping code to activate, oh well).
  3. See requests stall frequently.
  4. Install ActionDispatch::DebugLocks
  5. Observe /rails/locks output below
@freeatnet
freeatnet / abi.json
Created January 13, 2018 17:22
Tracking ED trades
[{"constant":false,"inputs":[{"name":"tokenGet","type":"address"},{"name":"amountGet","type":"uint256"},{"name":"tokenGive","type":"address"},{"name":"amountGive","type":"uint256"},{"name":"expires","type":"uint256"},{"name":"nonce","type":"uint256"},{"name":"user","type":"address"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"},{"name":"amount","type":"uint256"}],"name":"trade","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"tokenGet","type":"address"},{"name":"amountGet","type":"uint256"},{"name":"tokenGive","type":"address"},{"name":"amountGive","type":"uint256"},{"name":"expires","type":"uint256"},{"name":"nonce","type":"uint256"}],"name":"order","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"bytes32"}],"name":"orderFills","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"tokenGet","type":"ad
@freeatnet
freeatnet / order_fill_inquiry.py
Created January 13, 2018 21:15
Order fill inquiry
from decimal import Decimal
import json
from sha256 import sha256_like_solidity
from time import sleep, time
from web3 import Web3, HTTPProvider
HTTP_PROVIDER_URL = 'http://159.203.19.200:8545/'
ED_CONTRACT_ADDR = '0x8d12a197cb00d4747a1fe03395095ce2a5cc6819'
with open('etherdelta/abi.json') as f:
ED_CONTRACT_ABI = json.load(f)
@freeatnet
freeatnet / requirements.txt
Last active January 14, 2018 00:44
ED Socket Client
websocket-client
@freeatnet
freeatnet / config.toml
Created January 14, 2018 14:54
Parity public config
[parity]
public_node = false
[ui]
disable = true
[rpc]
disable = false
port = 8545
interface = "all"

Keybase proof

I hereby claim:

  • I am freeatnet on github.
  • I am freeatnet (https://keybase.io/freeatnet) on keybase.
  • I have a public key ASDHsewSapW0QBGfNT4VFSvBmJsquIomxtXLE62Nr9f7xwo

To claim this, I am signing this object:

@freeatnet
freeatnet / command.sh
Last active September 7, 2020 17:24
Disable eslint (or rather, lower the level of violation to a warning) for existing errors given a JSON output of an eslint run
# Command to generate the ignorables
npx eslint --quiet -o ignorable-lint.json --format json --ext '.js' app/