Skip to content

Instantly share code, notes, and snippets.

Martin Schenck schemar

Block or report user

Report or block schemar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am schemar on github.
  • I am schemar (https://keybase.io/schemar) on keybase.
  • I have a public key ASDp-urkJyGb5Y3rtlq_tER0c1pBkLj-6NzfkpvjYfjl5Qo

To claim this, I am signing this object:

@schemar
schemar / pre_calculate_contract_address.js
Last active Mar 27, 2019
Using web3 and RLP to pre-calculate an address that a contract will have after deployment. Based on address and nonce.
View pre_calculate_contract_address.js
/*
* ==========
* TypeScript
* ==========
*/
const nonce = 6;
// Forcing type `any`, as web3 sha3 otherwise complains that it only accepts strings.
// `RLP.encode()` returns a `Buffer`.
// However, converting the buffer to a string first yields the wrong result. The buffer has to
@schemar
schemar / .tridactylrc
Created Oct 11, 2018
Dvorak friendly config of tridactyl
View .tridactylrc
" bovine3dom's dogfood
" Provided only as an example.
" Do not install/run without reading through as you may be surprised by some
" of the settings.
" May require the latest beta builds.
" Move this to $XDG_CONFIG_DIR/tridactyl/tridactylrc (that's
" ~/.config/tridactyl/tridactylrc to mere mortals) or ~/.tridactylrc and
@schemar
schemar / config.py
Last active May 14, 2018
Dvorak friendly config for qutebrowser
View config.py
# Autogenerated config.py
# Documentation:
# qute://help/configuring.html
# qute://help/settings.html
# ~/.config/qutebrowser/config.py on Linux
# ~/.qutebrowser/config.py on macOS
# %APPDATA%/qutebrowser/config.py on Windows
# Uncomment this to still load settings configured via autoconfig.yml
View gist:b7399b295bc859d348af
cd /
du -hsx * | sort -rh | head -10
# du command -h option : display sizes in human readable format (e.g., 1K, 234M, 2G).
# du command -s option : show only a total for each argument (summary).
# du command -x option : skip directories on different file systems.
# sort command -r option : reverse the result of comparisons.
# sort command -h option : compare human readable numbers. This is GNU sort specific option only.
# head command -10 OR -n 10 option : show the first 10 lines.
#############################################################
@schemar
schemar / runTests.sh
Last active Aug 29, 2015
Bash script to reset the database, load fixtures and run tests for Symfony with one call.
View runTests.sh
#!/bin/bash
function printHelp {
echo "Load fixtures and run tests"
echo "Usage: runTests.sh [options] [directory]"
echo ""
echo "Options:"
echo " -r|--reset resets the sqlite test database before testing"
echo " -h|--help print this help"
echo ""
You can’t perform that action at this time.