Skip to content

Instantly share code, notes, and snippets.

@hadess
hadess / results.md
Last active June 2, 2021 09:09
Desktop SSD upgrade benchmarking

Using commands from https://askubuntu.com/a/991311

Both running on a Lenovo m720s SFF, through the m.2 PCIe 3.0 x4 interface.

Crucial P1 1TB 3D NAND

Sequential READ speed with big blocks:

` READ: bw=1919MiB/s (2012MB/s), 1919MiB/s-1919MiB/s (2012MB/s-2012MB/s), io=10.0GiB (10.7GB), run=5336-5336msec

@hadess
hadess / check-news.sh
Last active September 6, 2019 12:42
check-news on release for meson
#!/bin/sh
# Copyright (C) 2019 Red Hat, Inc.
# Author: Bastien Nocera <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
@hadess
hadess / smf1to0.sh
Last active June 24, 2019 21:29
SMF (Standard Midi File) 1 format to SMF 0 format converter using ALSA's arecordmidi
#!/bin/sh
#
# Adapted from https://music.stackexchange.com/questions/39040/how-can-i-convert-a-standard-midi-file-from-type-1-to-type-0
if [ $# != 2 ] ; then
echo "Usage: $0 infile.mid outfile.mid"
exit 1
fi
arecordmidi -p 14:0 "$2" &
@hadess
hadess / webkit-test.py
Created February 18, 2019 11:55
Simple WebKit test
#!/usr/bin/python3
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('WebKit2', '4.0')
from gi.repository import Gtk, WebKit2
window = Gtk.Window()
def on_destroy(window):
Gtk.main_quit()
@hadess
hadess / Warn-when-a-source-takes-too-long-to-process.patch
Created February 8, 2018 14:13
Warn when a GLib source takes too long to process
From 3ad096f33e6d148127d0417dd0e136dde51f309b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <[email protected]>
Date: Sat, 22 Mar 2014 13:18:04 +0100
Subject: [PATCH] XXX Warn when a source takes too long to process
---
glib/gmain.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/glib/gmain.c b/glib/gmain.c
@hadess
hadess / 49-teensy.rules
Created December 15, 2016 15:33
Teensy DFU rules for Fedora
# UDEV Rules for Teensy boards, http://www.pjrc.com/teensy/
#
# The latest version of this file may be found at:
# http://www.pjrc.com/teensy/49-teensy.rules
#
# This file must be placed at:
#
# /etc/udev/rules.d/49-teensy.rules (preferred location)
# or
# /lib/udev/rules.d/49-teensy.rules (req'd on some broken systems)
@hadess
hadess / dsdt.dsl
Created February 20, 2015 16:33
Lenovo X1 Carbon 2nd gen (2014)
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20141107-64 [Dec 2 2014]
* Copyright (c) 2000 - 2014 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of dsdt.dat, Wed Feb 18 14:06:14 2015
*
* Original Table Header:
@hadess
hadess / onda-v975w-boot.txt
Created January 5, 2015 21:41
Onda v975w boot log
-- Logs begin at Wed 2014-09-03 17:04:29 EDT, end at Mon 2015-01-05 16:38:48 EST. --
Jan 05 16:26:02 localhost.localdomain systemd-journal[114]: Runtime journal is using 8.0M (max allowed 73.2M, trying to leave 109.8M free of 724.3M available → current limit 73.2M).
Jan 05 16:26:02 localhost.localdomain systemd-journal[114]: Runtime journal is using 8.0M (max allowed 73.2M, trying to leave 109.8M free of 724.3M available → current limit 73.2M).
Jan 05 16:26:02 localhost.localdomain kernel: Initializing cgroup subsys cpuset
Jan 05 16:26:02 localhost.localdomain kernel: Initializing cgroup subsys cpu
Jan 05 16:26:02 localhost.localdomain kernel: Initializing cgroup subsys cpuacct
Jan 05 16:26:02 localhost.localdomain kernel: Linux version 3.18.0-1.fc21.i686 ([email protected]) (gcc version 4.9.2 20141101 (Red Hat 4.9.2-1) (GCC) ) #1 SMP Fri Dec 12 18:37:58 UTC 2014
Jan 05 16:26:02 localhost.localdomain kernel: e820: BIOS-provided physical RAM map:
Jan 05 16:26:02 localhost.localdomain
@hadess
hadess / 0001-mmc-sdhci-Disable-run-time-PM.patch
Last active January 7, 2023 18:30
Baytrail-T Wi-Fi stability patch
From df5bb0eca11e6ab072908b6e0d2e7d9e01d1eb84 Mon Sep 17 00:00:00 2001
From: Dong Aisheng <[email protected]>
Date: Wed, 24 Jun 2015 21:28:48 +0200
Subject: [PATCH] mmc: sdhci: get runtime pm when sdio irq is enabled
SDIO cards may need clock to send the card interrupt to host.
Thus, we get runtime pm when sdio irq is enabled to prevent the clock
resource is released and put it when sdio irq is disabled.
Signed-off-by: Dong Aisheng <[email protected]>
@hadess
hadess / setup-fedora-chroot.sh
Created August 4, 2014 11:57
Fedora chroot for Android device
#!/system/bin/sh
# Don't add a trailing slash, the script is fragile
ROOT=/mnt/sdcard
error()
{
echo '*** ' $1 ' ***'
exit 1;
}