Skip to content

Instantly share code, notes, and snippets.

@MirecX
MirecX / zfsbench
Created January 10, 2024 19:33 — forked from mergwyn/zfsbench
ZFS benchmarking using fio
#!/usr/bin/env bash
set -o errexit
echo $(date):Random read
fio --filename=test --sync=1 --rw=randread --bs=4k --numjobs=1 \
--iodepth=4 --group_reporting --name=test --filesize=10G --runtime=300 && rm test
echo $(date):Random write
fio --filename=test --sync=1 --rw=randwrite --bs=4k --numjobs=1 \
sudo apt update
sudo update-initramfs
sudo reboot
sudo amdgpu-install --usecase=graphics,opencl --vulkan=amdvlk
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
ports:
- "53:53/tcp"
#!/bin/bash
VALUETOCHECK=$(mpp-solar -P PI30 -p /dev/hidraw0 -c QPIGS -o json | jq -r '.battery_voltage')
SUB='23.'
echo $SUB
echo $VALUETOCHECK
if [[ "$VALUETOCHECK" == *"$SUB"* ]];then
echo "Let me switch charge mode real quick to UTI"
mpp-solar -P PI30 -p /dev/hidraw0 -c PCP02 -o json
else
echo "Back to solar"
@MirecX
MirecX / CompanyDataIndexTS.cs
Last active March 12, 2020 05:54
timeSeries RavenDB problem
using FinancialScreener.BL.Model;
using Raven.Client.Documents.Indexes.TimeSeries;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FinancialScreener.BL.Index
{
public class CompanyDataIndexTS : AbstractTimeSeriesIndexCreationTask<CompanyData, CompanyDataIndexTS.Result>
@MirecX
MirecX / console.save.js
Last active April 29, 2019 10:34
console.save(data, filename) -> primarne na json objekty
console.save = function (data, filename) {
if (!data) {
console.error('Console.save: No data')
return;
}
if (!filename) filename = 'story.json'
if (typeof data === "object") {
data = JSON.stringify(data, undefined, 4)