Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Geodesic Wrapper Script
set -o pipefail
# Geodesic Settings
export GEODESIC_PORT=${GEODESIC_PORT:-$((30000 + $$ % 30000))}
readonly OS=$(uname -s)
@3h4x
3h4x / BEP20Token.sol
Created March 6, 2021 07:14
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.16+commit.9c3226ce.js&optimize=false&runs=200&gist=
pragma solidity 0.5.16;
interface IBEP20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the token decimals.
To follow up with further information, I found {{ printf "%+v" . }} and {{ printf "%#v" . }} useful for showing the entire object of an alert.
### Keybase proof
I hereby claim:
* I am 3h4x on github.
* I am 3h4x (https://keybase.io/3h4x) on keybase.
* I have a public key ASC1t1qg9WeywJV0Q35buqGz5OcVRJMV3c9dAA7LY66Knwo
To claim this, I am signing this object:
@3h4x
3h4x / value
Last active July 18, 2018 10:36
8
@3h4x
3h4x / gist:dbeff2e08d53f32ae7adf341829df3a4
Created January 9, 2018 18:24
Ubuntu AMI finder CLI
import json
import re
import click
import dataset
import demjson
import requests
@click.command()
@3h4x
3h4x / gist:0aa6b000d198d9ec8222e720c8f0bfd3
Created January 5, 2018 13:50
Checking Ubuntu AMI releases
python -c "import requests; import csv; import json; result = [row for row in csv.reader(requests.get('https://cloud-images.ubuntu.com/query/released.latest.txt').content.decode('utf-8').splitlines(), delimiter='\t')]; print(json.dumps({k[0]: k[3] for k in result}, indent=4))"
@3h4x
3h4x / latency.txt
Created January 31, 2017 18:33 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
{
"id": "/ctrlpkw/db",
"apps": [
{
"id": "/ctrlpkw/db",
"apps": [
{
"id": "/ctrlpkw/db/cassandra-seed",
"constraints": [
[
{
"id": "/ctrlpkw",
"groups": [
{
"id": "/ctrlpkw/db",
"apps": [
{
"id": "/ctrlpkw/db/cassandra-seed",
"constraints": [["hostname", "UNIQUE"]],
"ports": [7199, 7000, 7001, 9160, 9042],