Skip to content

Instantly share code, notes, and snippets.

View aderumier's full-sized avatar

alexandre derumier aderumier

View GitHub Profile
#!/bin/bash
BOOTCONF="/boot/batocera-boot.conf"
LOG="/tmp/resize.log"
# only at start
test "$1" != "start" && exit 0
# true if triggers are not available or not set to do so
if ! grep -qE '^[ ]*autoresize[ ]*=[ ]*true[ ]*$' "${BOOTCONF}" && ! grep -qE '^[ ]*format-internal[ ]*=' "${BOOTCONF}"; then
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCuOCiHblTydAqUvspLQE6zvS4UNnRDirOWzBMCdIaGyFMMW8J/SSxNHwZ6REqFb8tAakE3W4JjSS0pSNgcikVFbmJWmPGUO32dpG5ZqQNNgA5uHccn5VtL2VxMo/ADToRCMDs7NrElgBQ71p/cRaz4dD0gvU7INSa/eRxihM8vVYv8zFNd8VsNa0MLQ7qvxvB3BFpIsqisvJXXkDtQbGNomzq/ViIzCpskB5F2Mf5+UFFRSwYIM6sprum4Rg9G7r9sXyH47o2LE7PByY+zgRljZ1qF28mOZl2oGNIT2p9b4tXViVEyFxP5XCqtYEKluSPWx78Xtho08vyuQhyQw3lOVOV+gIUyOKR2YH1R+dx65Ml6YBqMfRnrG5HTJTlIXHh2vI85JBDwOQoIvzRv7CmAY+Af3cMCSBlfOCnYWD+I8A43SigC8jrotiZtpBY9+C8lt4QT6bKdnC1pUMhguLOg4NiitM/yHjVkXFzT320PPqPesoXXxRPG4QwwE2xffWKGGYYt6zBuaBpIvdPVIlCR8TUOJ0lNoB7FHQQbmudfUurfQDTOLaLvg+P7uGHjtkOcRaLDKTvEvUSg0xes8kE3rc4wThdqGp5NpQF0Ib6Ddwq27AjE57JX0YPYJ9xWcPWi3aL3RyS73KrZfPDivq0iDi6/T/I+umMN/hcWtGkJyw== aderumier@odiso.com
include/qemu/rcu.h | 19 ++++++++++++
util/rcu.c | 76 +++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 94 insertions(+), 1 deletion(-)
diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h
index b063c6fde8..7ab8b899f6 100644
--- a/include/qemu/rcu.h
+++ b/include/qemu/rcu.h
@@ -196,6 +196,25 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(RCUReadAuto, rcu_read_auto_unlock)
void rcu_add_force_rcu_notifier(Notifier *n);
# fio --filename=/dev/sdb:/dev/sdc:/dev/sdd:/dev/sde:/dev/sdf:/dev/sdg --direct=1 --rw=randread --bs=4k --numjobs=6 --iodepth=32 --runtime=60 --time_based --group_reporting --name=-randread --ioengine=libaio
-sync-write: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=32
...
fio-3.25
Starting 6 processes
Jobs: 6 (f=36): [r(6)][100.0%][r=1153MiB/s][r=295k IOPS][eta 00m:00s]
-sync-write: (groupid=0, jobs=6): err= 0: pid=10337: Wed Mar 8 13:17:58 2023
read: IOPS=307k, BW=1198MiB/s (1256MB/s)(70.2GiB/60003msec)
slat (usec): min=2, max=4415, avg=10.05, stdev= 8.46
clat (usec): min=86, max=79754, avg=614.91, stdev=430.05
src_ip: Descending Count
107.170.224.16 672
198.199.112.155 672
162.243.143.29 671
192.241.199.30 671
192.241.206.140 671
107.170.228.12 670
162.243.129.15 670
104.152.52.232 669
107.170.228.16 600
/etc/udev/rules.d/90-resizefs.rules
-----------------------------------
ACTION=="change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", RUN+="/usr/local/bin/resizefs.sh"
/usr/local/bin/resizefs.sh
--------------------------
#!/bin/bash
if [ -n "$DEVNAME" ]; then
185.122.204.97:33054 [14/Nov/2022:06:31:44.397] FO~ honeypot/<NOSRV> -1/20747/-1/-1/19959 500 208 - - PT-- 19/18/2/0/0 0/0 {www.domain.com|Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.0 Safari/537.36|https://www.domain.com/} {|} "GET /if(now()=sysdate(),sleep(15),0)/%20negociation.htm HTTP/1.1"
185.122.204.97:39780 [14/Nov/2022:06:32:07.229] FO~ honeypot/<NOSRV> -1/19908/-1/-1/19791 500 208 - - PT-- 17/17/6/0/0 0/0 {www.domain.com|Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.0 Safari/537.36|https://www.domain.com/} {|} "GET /if(now()=sysdate(),sleep(15),0)/coeur%20ouvert.htm HTTP/1.1"
185.122.204.97:33232 [14/Nov/2022:06:32:27.127] FO~ honeypot/<NOSRV> -1/19945/-1/-1/19890 500 208 - - PT-- 24/24/5/0/0 0/0 {www.domain.com|Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.0 Safari/537.36|https://www.domain.com/} {|} "GET /if(now()=sysdate(),sleep(15),0)/afnor.
+ xtype: 'numberfield',
+ fieldLabel: gettext('Max Backups'),
+ name: 'maxfiles',
+ minValue: 0,
+ maxValue: 365,
+ value: me.create ? '1' : undefined,
+ allowBlank: false
+ },
+ {
+ xtype: 'numberfield',
@aderumier
aderumier / index.html
Created November 27, 2021 14:45
Isotope - packery layout mode
<h1>Isotope - packery layout mode</h1>
<div class="grid">
<div class="grid-item grid-item--width2"></div>
<div class="grid-item grid-item--height2"></div>
<div class="grid-item"></div>
<div class="grid-item"></div>
<div class="grid-item grid-item--width2 grid-item--height2"></div>
<div class="grid-item grid-item--width2"></div>
<div class="grid-item grid-item--width2"></div>
sub activate_volume {
my ($class, $storeid, $scfg, $volname, $snapname, $cache) = @_;
my $vg = $scfg->{vgname};
# only snapshot volumes needs activation
if ($snapname) {
my $snapvol = "snap_${volname}_$snapname";
my $cmd = ['/sbin/lvchange', '-ay', '-K', "$vg/$snapvol"];
run_command($cmd, errmsg => "activate_volume '$vg/$snapvol' error");