Skip to content

Instantly share code, notes, and snippets.

View hack3r-0m's full-sized avatar
🎯
Focusing

hack3r-0m

🎯
Focusing
View GitHub Profile
@mathben
mathben / archlinux_installation_ux370u_full_disk_encrypted.sh
Last active January 1, 2022 18:38
BASH - Installation Arch Linux on Asus ZenBook UX370U - Full disk single boot
#!/usr/bin/env bash
# French Guide : https://github.com/FredBezies/arch-tuto-installation
# Install ARCH Linux with UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M status=progress && sync # on linux
@npearce
npearce / install-docker.md
Last active April 9, 2024 12:48
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@rhlsthrm
rhlsthrm / ReentrancyToken.sol
Created October 9, 2018 17:18
Fake ERC20 token that recreates reentrancy attack
pragma solidity ^0.4.23;
import "./HumanStandardToken.sol";
import "../../LedgerChannel.sol";
contract ReentrancyToken is HumanStandardToken {
LedgerChannel ledgerChannel;
uint256 constant MAX_REENTRIES = 5;
uint256 numReentries = 0;
@whoisryosuke
whoisryosuke / api-form-submit.js
Created October 3, 2018 17:14
React - Handling forms and submitting POST data to API -- @see: https://reactjs.org/docs/forms.html
class NameForm extends React.Component {
constructor(props) {
super(props);
this.state = { name: '' };
}
handleChange = (event) => {
this.setState({[event.target.name]: event.target.value});
}
@epogrebnyak
epogrebnyak / digital_asset_types.md
Last active November 22, 2022 02:40
Cryptoeconomics

Value what

Adapted from Blockchain revolution:

  1. cryptocurrencies (BTC)
  2. platforms/smart contracts (ERC-20 + Cosmos, Aion, ICON)
  3. work/utility token (FileCoin, Golem) + via Selkix
  • “securitized” computing resources
@jdrew1303
jdrew1303 / readme.md
Last active April 2, 2024 20:34
Market Order Matching Engine

Introduction

The computer driven markets for instruments like stocks and exchange traded stock options, have transformed finance and the flow of capital. These markets are enabled by order matching engines (and the infrastructure that supports this software). Before computer trading networks and matching engines, stocks where traded on cavernous exchange floors and transaction costs where high. When electronic trading fully matured, floor traders were a fading anachronism and transaction costs had been reduced to pennies a share in many cases. Electronic trading could not exist without advanced network infrastructure, but without the software matching engines no shares would change hands. The computer trading networks, the matching engine software has also created a concentrated nexus of potential failure. Failures in these systems have increased as the frequency and volume on the electronic networks has increased. The position of order matching engines in the trading infrastructure makes these systems o

@mfuzailzubari
mfuzailzubari / nginx.conf
Created June 27, 2018 12:31
NGINX RTMP Configurations
worker_processes auto;
events {
# Allows up to 1024 connections, can be adjusted
worker_connections 1024;
}
# RTMP configuration
rtmp {
server {
listen 1935; # Listen on standard RTMP port
@dsemenovsky
dsemenovsky / watchEtherTransfers.js
Created June 1, 2018 23:55
Ether transfers watcher
function watchEtherTransfers() {
// Instantiate web3 with WebSocket provider
const web3 = new Web3(new Web3.providers.WebsocketProvider('wss://rinkeby.infura.io/ws'))
// Instantiate subscription object
const subscription = web3.eth.subscribe('pendingTransactions')
// Subscribe to pending transactions
subscription.subscribe((error, result) => {
if (error) console.log(error)
@aarnone
aarnone / pbcopy-and-pbpaste-in-arch-linux.md
Created May 14, 2018 21:06
Get pbcopy and pbpaste in Arch Linux

Get pbcopy and pbpaste in Arch Linux

First you need the 'xsel' package.

$> pacman -S xsel

Then create aliases.

alias pbcopy='xsel --clipboard --input'

alias pbpaste='xsel --clipboard --output'

@Dexaran
Dexaran / ERC20_token_standard_vulnerability_classification.md
Last active October 8, 2023 13:34
ERC20 token standard vulnerability classification.

Previously described at: ERC20 critical problems medium article.

Description.

ERC20 is the most common Ethereum token standard. It should be noted that it is also the first Ethereum's token standard as well.

It is also important that the original ERC20 proposal is a definition of token interface. EIP20 does not define a reference implementation for this token standard. Here is OpenZeppelin implementation of ERC20 token: https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts/token/ERC20

ERC20 token standard implementation assumes two ways of token transferring: (1) transfer function and (2) approve + transferFrom pattern.