This file contains hidden or 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
| //! EIP-7702 demo matching test1.sh: | |
| //! 1. Sign an EIP-7702 authorization delegating to the Alchemy smart wallet. | |
| //! 2. Approve OmniBridge to spend `AMOUNT` of the Aave token. | |
| //! 3. Call OmniBridge.initTransfer for `AMOUNT` to a NEAR recipient. | |
| //! Both inner calls are batched via `executeBatch` in a single type-4 tx. | |
| //! | |
| //! Required env vars: | |
| //! PRIVATE_KEY – hex EOA private key (with or without 0x) | |
| //! RPC_URL – HTTP(S) RPC endpoint (e.g. $QN_BASE) | |
This file contains hidden or 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/bash | |
| curl -X POST -H 'content-type: application/json' --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xf94547808504a817c800833d09008080b944f46080604052600080546001600160a01b03191673d216153c06e857cd7f72665e0af1d7d82172f494179055619c40600c553480156200003d57600080fd5b50604051620043d4380380620043d4833981018060405260608110156200006357600080fd5b8101908080516401000000008111156200007c57600080fd5b820160208101848111156200009057600080fd5b8151640100000000811182820187101715620000ab57600080fd5b50509291906020018051640100000000811115620000c857600080fd5b82016020810184811115620000dc57600080fd5b8151640100000000811182820187101715620000f757600080fd5b505092919060200180516401000000008111156200011457600080fd5b820160208101848111156200012857600080fd5b81518560208202830111640100000000821117156200014657600080fd5b505092919050505033333385858582600390805190602001906200016c92919062000581565b5081516200018290600490602085019062000581565b5080516200019890600590602084019062000606565b5060005b600554811015620001fa57600 |
This file contains hidden or 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/bash | |
| ## | |
| ## Use rsync to sync a project to a remote host | |
| ## 1. Define the $HOST node | |
| ## 2. Define $DST_FOLDER on the remote host | |
| ## 3. Execute | |
| ## | |
| # We use this instead of $PWD when building through sublimetext |
This file contains hidden or 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
| """Encrypt with Openssl, decrypt with python! | |
| """ | |
| from Crypto.Cipher import AES | |
| from base64 import b64decode | |
| from Crypto.Util.Padding import unpad | |
| from hashlib import sha256 | |
| # Command line |
This file contains hidden or 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/bash | |
| # Thanks to | |
| # https://gotofritz.net/blog/howto/joining-pdf-files-in-os-x-from-the-command-line/ | |
| # | |
| "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" -o PATH/TO/YOUR/MERGED/FILE.pdf /PATH/TO/ORIGINAL/1.pdf /PATH/TO/ANOTHER/2.pdf /PATH/TO/A/WHOLE/DIR/*.pdf | |
This file contains hidden or 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/bash | |
| # Finds alphanumeric char strings 64 chars long | |
| egrep -o "\w{64}" |
This file contains hidden or 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
| How-To: create bootable USB-stick from ISO image: | |
| ================================================= | |
| 1. Download ISO image file: | |
| wget -o ~/Desktop/mini.iso http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/mini.iso | |
| 2. Convert ISO file to DMG format using hdiutil: | |
| hdiutil convert -format UDRW -o Desktop/mini.img Desktop/mini.iso |
This file contains hidden or 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/bash | |
| abs_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | |
| echo 'abs path: '$abs_path |