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
@freeatnet
freeatnet / requirements.txt
Last active January 14, 2018 00:44
ED Socket Client
websocket-client
@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 / 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 / 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
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
@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 {
.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,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@freeatnet
freeatnet / gist:6349739
Created August 27, 2013 04:53
dig 500px.com
dig 500px.com upload.500px.com pcdn.500px.net any a; dig 500px.com upload.500px.com pcdn.500px.net any a +cd