Skip to content

Instantly share code, notes, and snippets.

View shayanb's full-sized avatar
💭
\-=-=|=-=-/

Shayan Eskandari shayanb

💭
\-=-=|=-=-/
View GitHub Profile
@chriseth
chriseth / async.md
Last active January 21, 2025 00:00
Async Solidity Contracts

Having seen @pirapira's sketch of Bamboo ( https://github.com/pirapira/bamboo/ ), which proposed to add better control about the "smart contract program flow", even across calls, I thought that this should certainly be added to Solidity, and actually, it might even be possible now to a certain degree using inline assembly.

The problem is that with many functions in a contract, it is not always clear which can be called at which stage in the contract's lifetime. Certain smart contracts would be easier to understand if written as follows:

@tyler-smith
tyler-smith / ob.cfg
Created March 3, 2016 21:08
ob.cfg for mainnet test
[CONSTANTS]
DATA_FOLDER = ~/OpenBazaarMainnetTest
KSIZE = 20
ALPHA = 3
TRANSACTION_FEE = 15000
LIBBITCOIN_SERVER = tcp://libbitcoin1.openbazaar.org:9091
@moshest
moshest / p2p-list.md
Last active February 13, 2022 09:33
A collection of peer-to-peer decentralized projects.
@petertodd
petertodd / gist:8e87c782bdf342ef18fb
Last active December 13, 2020 05:33
What the CoinWallet.eu tx-flood stress-test means for you and how to deal with it
@jedisct1
jedisct1 / pureftpd shellshock.txt
Last active August 8, 2023 20:07
Pure-FTPd + external authentication handler #shellshock POC
$ cat > /tmp/handler.sh
#! /bin/bash
echo auth_ok:1
echo uid:42
echo gid:21
echo dir:/tmp
echo end
^D
$ chmod +x /tmp/handler.sh
@KonradIT
KonradIT / ambernation.sh
Last active May 22, 2024 19:09
GoPro HERO3 Black's interesting executable / wifi configuration / script files, most of them are from /usr/local/share/script
#!/bin/sh
cd /
umount /pref
echo 3 > /proc/sys/vm/drop_caches
#wifi mode is specified
if [ "${1}" == "ap" ]; then
echo -e "\nPress CTRL+C now if you want to skip hibernation"
echo "killall hostapd"
killall hostapd
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@afk11
afk11 / gist:a9d5198c205879c25c01
Created July 5, 2014 12:32
Bitcore BIP32 key deriv + raw transaction signing (not working at present)
<!DOCTYPE html>
<html>
<head>
<title>User Registration</title>
<script src="bitcorelatest.js"></script>
<script>
// Derive given private key index..
function get_bip32_key(path) {
@laanwj
laanwj / sendalert.cpp
Last active July 9, 2018 13:06
Bitcoin send alert code
/*
So you need to broadcast an alert...
... here's what to do:
1. Copy sendalert.cpp into your bitcoind build directory
2. Decrypt the alert keys
copy the decrypted file as alertkeys.h into the src/ directory.
3. Modify the alert parameters in sendalert.cpp
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active April 19, 2025 04:48
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k