Skip to content

Instantly share code, notes, and snippets.

View gist:2e1d6746d3bfec3c7f5eadfb9570c990
Starej stroj
======================================================================
/dev/sda:
Timing cached reads: 7700 MB in 1.98 seconds = 3892.51 MB/sec
Timing buffered disk reads: 136 MB in 3.10 seconds = 43.82 MB/sec
root@app:/home/sh# sudo hdparm -tT /dev/sdb
/dev/sdb:
Timing cached reads: 11158 MB in 1.99 seconds = 5621.13 MB/sec
Timing buffered disk reads: 194 MB in 3.01 seconds = 64.54 MB/sec
@analogic
analogic / gist:d44a6fccb836c48213aa3a50685be2fd
Last active Jun 15, 2021
app.fixnet.cz - sybench, old hw
View gist:d44a6fccb836c48213aa3a50685be2fd
root@app:/home/sh# openssl speed -evp aes-128-cbc
Doing aes-128-cbc for 3s on 16 size blocks: 177115900 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 48725915 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 12633111 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 3128447 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 393555 aes-128-cbc's in 2.99s
OpenSSL 1.0.2g 1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx)
compiler: cc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_A
@analogic
analogic / datahub.io-continent-codes_json.json
Last active Feb 23, 2021
datahub.io-country-codes.json
View datahub.io-continent-codes_json.json
[{"Code": "AF", "Name": "Africa"},{"Code": "NA", "Name": "North America"},{"Code": "OC", "Name": "Oceania"},{"Code": "AN", "Name": "Antarctica"},{"Code": "AS", "Name": "Asia"},{"Code": "EU", "Name": "Europe"},{"Code": "SA", "Name": "South America"}]
@analogic
analogic / main.go
Created Sep 15, 2020
Hongyuv ultrasonic anemometer + RPI RS486 HAT
View main.go
package main
import (
"bytes"
"encoding/binary"
"fmt"
"time"
)
import "github.com/goburrow/modbus"
View continent-codes.json
[
{
"Code":"AF",
"Name":"Africa"
},
{
"Code":"AN",
"Name":"Antarctica"
},
{
View country-codes.json
[
{
"country-name": "Afghanistan",
"iso2": "AF",
"iso3": "AFG",
"top-level-domain": "af",
"fips": "AF",
"iso-numeric": "004",
"geonameid": "1149361",
"e164": "93",
View gist:59f9eda7f0d50f578b7f72ce87d00076
#!/bin/bash
cp -Rp /data/mailserver/log/dmarc/analogic.cz /tmp/dmarc-analogic.cz
cp -Rp /data/mailserver/log/dmarc/ranky.cz /tmp/dmarc-poste.io
cd /tmp/dmarc-analogic.cz
rename 's/humplik\.cz/analogic.cz/g' *
find . -type f -name '*' -exec bash -c 't=$(stat -c %y "$0"); sed -i -e "s/humplik\.cz/analogic.cz/g" "$0"; touch -d "$t" "$0"' {} \;
rm -Rf /data/mailserver-demo/log/dmarc/analogic.cz
mv /tmp/dmarc-analogic.cz /data/mailserver-demo/log/dmarc/analogic.cz
View huawei-pwd-aes256.py
"""
Decoder for the Huawei AES256 encryption scheme. Further details are
available at the following URL:
http://blog.emaze.net/2013/12/yet-another-huawei-weak-password.html
Author: Roberto Paleari (@rpaleari)
"""
from Crypto.Cipher import AES
@analogic
analogic / creditas.php
Created Jun 4, 2019
Minimalistic Creditas Bank API client
View creditas.php
<?php
class Creditas {
private $id;
private $secret;
public function __construct(string $id, string $secret)
{
$this->id = $id;
@analogic
analogic / .drone.yml
Created Mar 18, 2019
Moving from cloud.docker.com autobuild+autotest to drone.io (repository must be privileged!§)
View .drone.yml
kind: pipeline
name: default
steps:
- name: test
image: docker:dind
privileged: true
pull: true
volumes:
- name: dockersock