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
/* Converts a hexadecimal string, whose bytes equivalent length | |
can be up to 32 bytes (at least only tested and meant for up to 32 bytes) | |
into a bytes32 type. | |
EXAMPLE I/O | |
I: "a0c3689df9ce9c3aee5c1ba34dd1649098e2a10f6b2b337bf26695318cc0b958" | |
O: bytes32: 0xa0c3689df9ce9c3aee5c1ba34dd1649098e2a10f6b2b337bf26695318cc0b958 | |
Currently assumes the 0x prefix is omitted from the string. |
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
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
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
american fuzzy lop 2.52b (output) | |
┌─ process timing ─────────────────────────────────────┬─ overall results ─────┐ | |
│ run time : 7 days, 20 hrs, 28 min, 6 sec │ cycles done : 186 │ | |
│ last new path : 1 days, 0 hrs, 2 min, 8 sec │ total paths : 88 │ | |
│ last uniq crash : none seen yet │ uniq crashes : 0 │ | |
│ last uniq hang : none seen yet │ uniq hangs : 0 │ | |
├─ cycle progress ────────────────────┬─ map coverage ─┴───────────────────────┤ | |
│ now processing : 87 (98.86%) │ map density : 0.74% / 0.97% │ | |
│ paths timed out : 0 (0.00%) │ count coverage : 1.73 bits/tuple │ |
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
import sequtils, tables, strutils | |
const gameRange = (1..100).toSeq | |
const gameRuleTable = { | |
3: "Fizz", | |
5: "Buzz" | |
}.toOrderedTable | |
proc gameRules(x: int): string = | |
for k,v in gameRuleTable.pairs: |
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/sh | |
verbose_echo() | |
{ | |
[ -n "${VERBOSE##[NFnf]*}" ] && \ | |
echo "$@" | |
} | |
LOGGED_USERS=$(who | awk '{print $1 " "}') | |
for user in $LOGGED_USERS; do |
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
Ciphers aes192-ctr,aes256-ctr,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com | |
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group18-sha512 | |
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com | |
HostKeyAlgorithms ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa |
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
from datetime import datetime, timedelta | |
from hashlib import md5 | |
from copy import deepcopy | |
import json | |
# creates an md5 hash dict for caching in memory | |
class Cache: | |
# args expect seconds | |
def __init__(self, expiry, clearInterval): | |
if (not type(expiry) == int) or (not type(clearInterval) == int): |
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 solidity ^0.4.0; | |
import "browser/oraclizeapi.sol"; | |
contract brokenWOraclize is usingOraclize { | |
event DEBUG(uint[] a); | |
function brokenWOraclize() { | |
oraclize_setProof(proofType_TLSNotary | proofStorage_IPFS); | |
} |
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
contract ForkSplitterConduit { | |
//Tracks whether hard fork is effective on this chain. True means the fork is passed, false it hasn't. | |
bool forked = false; | |
//Identifies on which network fork this contract should do transfers. True transfers only on a hard-fork network, and false on the original network. | |
bool transferOnlyFork; | |
//Hard-fork DAO withdrawal contract | |
address constant C = 0xbf4ed7b27f1d666546e30d74d50d173d20bca754; | |
//In Constructor you set whether you want this contract to operate on hard fork or non-hard fork network | |
// Set to true for transfers to only complete on hard fork, and false for non-hard fork |
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
" Specify a directory for plugins | |
" - For Neovim: stdpath('data') . '/plugged' | |
" - Avoid using standard Vim directory names like 'plugin' | |
call plug#begin('~/.vim/plugged') | |
" Make sure you use single quotes | |
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align | |
Plug 'junegunn/vim-easy-align' |
NewerOlder