Skip to content

Instantly share code, notes, and snippets.

Avatar
🦀

Alexander Koz. fzzr-

🦀
View GitHub Profile
@fzzr-
fzzr- / tm-exclude.sh
Last active Feb 3, 2020
[MacOS] TimeMachine Exclude Build Files
View tm-exclude.sh
#!/bin/bash
exclude() {
THE_NAME=$1
ROOT_DIR=$2
TARGET_FILE=$3
NEAR_DIR=$4
TARGET_DIR=$5
echo "searching build-dirs for $THE_NAME projects where '$NEAR_DIR' near by '$TARGET_FILE' starting from $ROOT_DIR"
View .rustfmt
# https://github.com/rust-lang-nursery/rustfmt
# https://github.com/rust-lang-nursery/rustfmt/blob/master/Configurations.md
#! required min version rustfmt-nightly = "0.99.4"
# edition = "Edition2018"
max_width = 126
comment_width = 126
# Indentation:
newline_style = "Unix"
@fzzr-
fzzr- / ecverify.sol
Created Jun 19, 2017 — forked from axic/ecverify.sol
Ethereum ECVerify
View ecverify.sol
//
// The new assembly support in Solidity makes writing helpers easy.
// Many have complained how complex it is to use `ecrecover`, especially in conjunction
// with the `eth_sign` RPC call. Here is a helper, which makes that a matter of a single call.
//
// Sample input parameters:
// (with v=0)
// "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad",
// "0xaca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d6439346b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf200",
// "0x0e5cb767cce09a7f3ca594df118aa519be5e2b5a"
@fzzr-
fzzr- / README.rst
Created Jun 10, 2017 — forked from tonyseek/README.rst
Build Python binding of C++ library with cffi (PyPy/Py3K compatible)
View README.rst

Run with Python:

pip-2.7 install cffi
PYTHON=python2.7 sh go.sh

Run with PyPy:

pip-pypy install cffi
PYTHON=pypy sh go.sh
@fzzr-
fzzr- / myweechat.md
Created May 9, 2017 — forked from pascalpoitras/myweechat.md
My always up-to-date WeeChat configuration (weechat-dev)
View myweechat.md

WeeChat Screenshot

Enable mouse support

/mouse enable

Encrypted password in sec.conf

@fzzr-
fzzr- / gist:e45184059bfa14941675ef6d4043dbee
Created May 9, 2017 — forked from mattikus/gist:856946
two attempts to connect to freenode with weechat-git
View gist:e45184059bfa14941675ef6d4043dbee
19:45:09 freenode | irc: reconnecting to server...
19:45:09 freenode | irc: connecting to server chat.us.freenode.net/7070 (SSL)...
19:45:09 freenode | gnutls: connected using 1024-bit Diffie-Hellman shared secret exchange
19:45:09 freenode =!= | gnutls: peer's certificate is NOT trusted
19:45:09 freenode =!= | gnutls: peer's certificate issuer is unknown
19:45:09 freenode | gnutls: receiving 2 certificates
19:45:09 freenode | - certificate[1] info:
19:45:09 freenode | - subject `OU=Domain Control Validated,OU=Gandi Standard Wildcard SSL,CN=*.freenode.net', issuer `C=FR,O=GANDI SAS,CN=Gandi Standard SSL CA', RSA key 2048 bits, signed using
| RSA-SHA1, activated `2011-01-14 00:00:00 UTC', expires `2012-01-14 23:59:59 UTC', SHA-1 fingerprint `acd50e69ad93f5db08fefb67180d871415858664'
19:45:09 freenode | - certificate[2] info:
@fzzr-
fzzr- / keybase.md
Created Aug 12, 2016
Keybase proof
View keybase.md

Keybase proof

I hereby claim:

  • I am fzzr- on github.
  • I am fzzr (https://keybase.io/fzzr) on keybase.
  • I have a public key whose fingerprint is AD4D 3458 14E1 099E 4041 402E F16A EBE2 D53F 21E2

To claim this, I am signing this object:

@fzzr-
fzzr- / Main.hx
Created Jun 26, 2016 — forked from skial/Main.hx
Haxe 3.3.0-rc.1 Abstract @:resolve and @:op(a.b) metadata simplified examples.
View Main.hx
package;
import haxe.macro.Expr;
class Main {
static function main() {
var smap:StringMap = ['firstName' => 'Skial', 'lastName' => 'Bainn'];
trace( smap.lastName, smap.firstName ); // Bainn, Skial
@fzzr-
fzzr- / Ipfs.url.scheme.handler.scpt
Last active Apr 10, 2016
IPFS / IPNS URL-Scheme Handler App (for Mac OS X Safari only)
View Ipfs.url.scheme.handler.scpt
-- https://gist.github.com/fzzr-/b9cc28ee20cac95706d0bca1cedcbed9
on open location theURL
set theNewURL to ""
set theGateway to "https://gateway.ipfs.io/"
set oldDelims to AppleScript's text item delimiters
-- xxx: better use `env bash -l`
set isIpfsRunning to length of (do shell script "bash -lc " & quoted form of "ipfs id -f='<addrs>'") > 0
-- todo: display dialog "Wanna activate IPFS daemon?"
if (isIpfsRunning) then
set theGateway to "http://127.0.0.1:8080/"