Skip to content

Instantly share code, notes, and snippets.

View O1ahmad's full-sized avatar
🌎
Working from home

Ahmad O1ahmad

🌎
Working from home
View GitHub Profile
@O1ahmad
O1ahmad / geth-config.toml
Created June 4, 2019 02:20
Geth (Go Ethereum) - Example TOML config | `geth dumpconfig`
[Eth]
NetworkId = 1
SyncMode = "fast"
NoPruning = false
LightPeers = 100
DatabaseCache = 512
TrieCleanCache = 256
TrieDirtyCache = 256
TrieTimeout = 3600000000000
MinerGasFloor = 8000000
@O1ahmad
O1ahmad / geth-cli-options
Last active June 4, 2019 02:52
Geth (Go Ethereum) - Example CLI Options | `geth --help`
COMMANDS:
account Manage accounts
attach Start an interactive JavaScript environment (connect to node)
bug opens a window to report a bug on the geth repo
console Start an interactive JavaScript environment
copydb Create a local chain from a target chaindata folder
dump Dump a specific block from storage
dumpconfig Show configuration values
export Export blockchain into file
export-preimages Export the preimage database into an RLP stream
@O1ahmad
O1ahmad / libinput-gestures.config
Created November 16, 2019 15:45
Example libinput gestures config
# Configuration file for libinput-gestures.
# Mark Blakeney, Sep 2015
#
# The default configuration file exists at /etc/libinput-gestures.conf
# but a user can create a personal custom configuration file at
# ~/.config/libinput-gestures.conf.
#
# Lines starting with '#' and blank lines are ignored. Currently
# "gesture" and "device" configuration keywords are supported as
# described below. The keyword can optionally be appended with a ":" (to
@O1ahmad
O1ahmad / .vimrc
Last active November 26, 2019 18:52
My initial development .vimrc configuration for reference
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" Turn on syntax highlighting
syntax on
" set the runtime path to include Vundle and initialize
@O1ahmad
O1ahmad / CENTOS7 elasticsearch.service
Last active December 8, 2019 15:58
default rhel-centos7 elasticsearch.service unit
[Unit]
Description=Elasticsearch
Documentation=http://www.elastic.co
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
RuntimeDirectory=elasticsearch
PrivateTmp=true
@O1ahmad
O1ahmad / config.toml
Created December 16, 2019 00:44
Lotus default configuration file
# Default config:
#[API]
# ListenAddress = "/ip4/127.0.0.1/tcp/1234/http"
# Timeout = "30s"
#
#[Libp2p]
# ListenAddresses = ["/ip4/0.0.0.0/tcp/0", "/ip6/::/tcp/0"]
#
#[Metrics]
# Nickname = ""
@O1ahmad
O1ahmad / crystal-disk-mark-fio-bench.sh
Created December 17, 2019 17:23
CrystalDiskMark-esque Disk Benchmark (using fio)
#!/bin/bash
LOOPS=5 #How many times to run each test
SIZE=1024 #Size of each test, multiples of 32 recommended for Q32 tests to give the most accurate results.
WRITEZERO=0 #Set whether to write zeroes or randoms to testfile (random is the default for both fio and crystaldiskmark); dd benchmarks typically only write zeroes which is why there can be a speed difference.
QSIZE=$(($SIZE / 32)) #Size of Q32Seq tests
SIZE+=m
QSIZE+=m
@O1ahmad
O1ahmad / CLI options
Created December 26, 2019 19:20
lotus-storage-miner CLI options
$ lotus-storage-miner run -h
NAME:
lotus-storage-miner run - Start a lotus storage miner process
USAGE:
lotus-storage-miner run [command options] [arguments...]
OPTIONS:
--api value (default: "2345")
--enable-gpu-proving enable use of GPU for mining operations (default: true)
@O1ahmad
O1ahmad / lotus CLI options
Created December 26, 2019 19:22
lotus command-line interface(CLI) options
$ lotus daemon -h
NAME:
lotus daemon - Start a lotus daemon process
USAGE:
lotus daemon [command options] [arguments...]
OPTIONS:
--api value (default: "1234")
--genesis value genesis file to use for first node run
@O1ahmad
O1ahmad / Prometheus CLI options
Created January 5, 2020 20:41
Prometheus command-line interface (CLI) options
$ ./prometheus -h
usage: prometheus [<flags>]
The Prometheus monitoring server
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).