This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pragma version ^0.3.0 | |
@view | |
@external | |
def printcall_uint(x: uint256) -> uint256: | |
print(x) | |
return x | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
# Switch kitty to dark mode | |
$HOME/.local/bin/kitty_mode dark | |
# Switch Sublime | |
$HOME/.local/bin/sublime_mode dark | |
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" | |
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
############################################################### | |
# Script to create a symmetric encrypted backup tarball | |
# | |
# Usage | |
# ----- | |
# backup_encrypted test /run/media/mike/asdf1234 ~/.backups/ | |
# | |
# Extracting backup | |
# ----------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![no_std] | |
#![no_main] | |
// Rotate LEDs on board and allow user to change their direction | |
use panic_semihosting as _; | |
use cortex_m_rt::entry; | |
use cortex_m_semihosting::{dbg, heprint}; | |
use stm32f3_discovery::button::UserButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# Example Usage | |
# ------------- | |
# nimbus_beacon_node --config-file $HOME/.config/nimbus-eth2.toml | |
### | |
network = "mainnet" | |
data-dir = "/data/ethereum/nimbus" | |
web3-url = ["http://127.0.0.1:8551"] | |
jwt-secret = "/data/ethereum/erigon/jwt.hex" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ERC721_ABI = [{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":False,"inputs":[{"indexed":True,"internalType":"address","name":"owner","type":"address"},{"indexed":True,"internalType":"address","name":"approved","type":"address"},{"indexed":True,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":False,"inputs":[{"indexed":True,"internalType":"address","name":"owner","type":"address"},{"indexed":True,"internalType":"address","name":"operator","type":"address"},{"indexed":False,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":False,"inputs":[{"indexed":True,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":True,"internalType":"address","name":"newOwner","type":"address"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"Owne |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Blindly dumps the storage of an Ethereum contract | |
This dumps non-zero slots: | |
- range(0, height) | |
- range(keccak(slot), keccak(slot) + width) | |
This script makes no attempt to decode them past Python byte strings. | |
""" | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
""" | |
Adjust the brightness of your laptop's backlight. Good for use with Fluxbox | |
Usage: | |
/usr/bin/brightness.py --step 100 down /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight | |
Fluxbox config `~/.fluxbox/keys`: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
""" | |
Detect any contracts that selfdestruct that interacted with a contract. | |
1) Look for code before, during, and after contract, any transition from | |
having code to having no code is suspect. | |
2) If not marked as suspect and no code found, look through etherscan for a | |
contract creation transaction in the account's history for good measure |
NewerOlder