wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zipunzip 8-07-14_MegaCLI.zip| # Script to generate a new block every minute | |
| # Put this script at the root of your unpacked folder | |
| #!/bin/bash | |
| echo "Generating a block every minute. Press [CTRL+C] to stop.." | |
| address=`./bin/bitcoin-cli getnewaddress` | |
| while : | |
| do |
| root@prod-ceph-node5:~# cat /etc/ceph/ceph.conf |egrep -i '(blue|read)' | |
| bluestore default buffered read = true | |
| osd disk threads = 12 | |
| filestore op threads = 12 | |
| bluestore compression mode = none | |
| bluestore min alloc size ssd = 4096 | |
| bluestore min alloc size hdd = 4096 | |
| root@prod-ceph-node5:~# |
| package logging | |
| import ( | |
| "github.com/rs/zerolog" | |
| "github.com/rs/zerolog/log" | |
| "gopkg.in/natefinch/lumberjack.v2" | |
| "os" | |
| "path" | |
| "io" | |
| ) |
| # Put this file under /etc/spamassassin/ and run an sa-update or reload amavis etc. | |
| # | |
| #-------------------------------------------------- | |
| # The only RBL I trust, UCEPROTECT1 (single IP, not IP-ranges or entire ISPs) http://uceprotect.net | |
| #-------------------------------------------------- | |
| header RCVD_IN_UCEPROTECT1 eval:check_rbl_txt('uceprotect1', 'dnsbl-1.uceprotect.net') | |
| describe RCVD_IN_UCEPROTECT1 Listed in dnsbl-1.uceprotect.net | |
| tflags RCVD_IN_UCEPROTECT1 net | |
| score RCVD_IN_UCEPROTECT1 1.8 |
| // how to compile: gcc dynamic_loading.c -o dynamic_loading -ldl | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <dlfcn.h> | |
| #include <string.h> | |
| int main(int argc, char **argv) { | |
| void *handle; | |
| void (*go)(char *); | |
| ### KERNEL TUNING ### | |
| # Increase size of file handles and inode cache | |
| fs.file-max = 2097152 | |
| # Do less swapping | |
| vm.swappiness = 10 | |
| vm.dirty_ratio = 60 | |
| vm.dirty_background_ratio = 2 |
| package main | |
| import ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "crypto/sha256" | |
| "encoding/hex" | |
| "fmt" | |
| "strings" |
| {- | |
| a small sample (the smallest ?) of MonadLogger | |
| -} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| module MonadLoggerSample where | |
| import Control.Monad.Logger |
| import monix.eval.Task | |
| import java.util.concurrent.TimeUnit | |
| import scala.concurrent.duration._ | |
| /** Request limiter for APIs that have quotas per second, minute, hour, etc. | |
| * | |
| * {{{ | |
| * // Rate-limits to 100 requests per second | |
| * val limiter = TaskLimiter(TimeUnit.SECONDS, limit = 100) | |
| * |