Skip to content

Instantly share code, notes, and snippets.

-------------------------------------------------
nench.sh v2017.06.01 -- https://git.io/nench.sh
benchmark timestamp: 2018-03-19 18:22:18 UTC
-------------------------------------------------
Processor: Intel(R) Atom(TM) CPU C2750 @ 2.40GHz
CPU cores: 2
Frequency: 2393.902 MHz
RAM: 1.9G
Swap: -
VM on ZFS
-------------------------------------------------
nench.sh v2017.06.01 -- https://git.io/nench.sh
benchmark timestamp: 2018-03-19 18:39:10 UTC
-------------------------------------------------
Processor: Intel Core Processor (Broadwell)
CPU cores: 4
Frequency: 3312.000 MHz
RAM: 2.0G
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by zfs configure 0.7.9, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ ./configure --with-linux=/home/mayli/filer/kernel/4.4.52/ --with-spl=../spl-0.7.9 --target=arm --host=arm
## --------- ##
## Platform. ##
import threading
import Queue
import shelve
from multiprocessing.pool import ThreadPool
import logging
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s:[%(threadName)s] %('
'levelname)s - %(message)s')
logger = logging.getLogger(__name__)
@mayli
mayli / zfs -S
Created January 29, 2019 19:59
dedupe?
Simulated DDT histogram:
bucket allocated referenced
______ ______________________________ ______________________________
refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE
------ ------ ----- ----- ----- ------ ----- ----- -----
1 13.6M 6.60T 6.34T 6.34T 13.6M 6.60T 6.34T 6.34T
2 980K 156G 144G 145G 1.99M 327G 302G 304G
4 74.1K 6.75G 5.26G 5.40G 339K 31.7G 24.7G 25.4G
8 13.0K 1.70G 1.39G 1.42G 131K 20.0G 16.9G 17.2G
@mayli
mayli / Dockerfile
Created May 6, 2019 20:37
mosh static alpine docker
FROM alpine:latest
MAINTAINER Brett Randall <[email protected]>
# NOTE: openssh is only required for testing connection to built docker using the built mosh-server
RUN apk update \
&& apk add alpine-sdk autoconf automake protobuf-dev ncurses ncurses-dev ncurses-static openssl-dev openssh
RUN apk add perl-doc
RUN git clone https://github.com/mobile-shell/mosh.git \
&& cd mosh \
@mayli
mayli / unbalancer.py
Created July 3, 2019 22:47
the unbalancer.py for mergerfs
#!/usr/bin/env python2
import argparse
import os
import shutil
@mayli
mayli / opengrok.user.js
Last active October 17, 2019 00:10
opengrok jump to line
// ==UserScript==
// @name Opengrok jump to line
// @namespace http://tampermonkey.net/
// @version 0.1
// @description does it work?
// @author You
// @include /^https?://opengrok.*$/
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @updateUrl https://gist.github.com/mayli/d349360df3a5c738ee0ebcccb980cf03/raw/351ada4d06837c1ee2218894e57587961eecc5b3/opengrok.user.js
@mayli
mayli / README.md
Last active November 6, 2019 02:53

usage

ban.py

`kubectl logs --all-containers=true --tail=20 -f -l workload.user.cattle.io/workloadselector=web | python2 ./ban.py`

ratecounter.py

`kubectl logs --all-containers=true --tail=20 -f -l workload.user.cattle.io/workloadselector=web | python2 ratecounter.py web`

kubectl logs --all-containers=true --tail=20 -f -l workload.user.cattle.io/workloadselector=tracker | python2 ratecounter.py tracker

@mayli
mayli / Dockerfile
Created January 20, 2020 07:03
docker build exodus qbittorrent-nox
FROM alpine
RUN apk update && apk add python git automake libtool git boost-dev openssl-dev qt5-qtbase-dev qt5-qttools-dev autoconf build-base py2-pip
RUN pip install exodus-bundler
RUN cd && git clone https://github.com/arvidn/libtorrent.git && \
cd libtorrent/ && \
git checkout RC_1_2 && \
./autotool.sh && \
./configure --disable-debug --enable-encryption CXXFLAGS="-std=c++14" && \
make -j$(nproc) && \
make install