Skip to content

Instantly share code, notes, and snippets.

hadess

Block or report user

Report or block hadess

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hadess
hadess / check-news.sh
Last active Sep 6, 2019
check-news on release for meson
View check-news.sh
#!/bin/sh
# Copyright (C) 2019 Red Hat, Inc.
# Author: Bastien Nocera <hadess@hadess.net>
#
# 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 Jun 24, 2019
SMF (Standard Midi File) 1 format to SMF 0 format converter using ALSA's arecordmidi
View smf1to0.sh
#!/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 Feb 18, 2019
Simple WebKit test
View webkit-test.py
#!/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 Feb 8, 2018
Warn when a GLib source takes too long to process
View Warn-when-a-source-takes-too-long-to-process.patch
From 3ad096f33e6d148127d0417dd0e136dde51f309b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
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 Dec 15, 2016
Teensy DFU rules for Fedora
View 49-teensy.rules
# 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 Feb 20, 2015
Lenovo X1 Carbon 2nd gen (2014)
View dsdt.dsl
/*
* 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:
View onda-v975w-boot.txt
-- 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 (mockbuild@buildvm-16.phx2.fedoraproject.org) (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 Aug 29, 2015
Baytrail-T Wi-Fi stability patch
View 0001-mmc-sdhci-Disable-run-time-PM.patch
From df5bb0eca11e6ab072908b6e0d2e7d9e01d1eb84 Mon Sep 17 00:00:00 2001
From: Dong Aisheng <b29396@freescale.com>
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 <b29396@freescale.com>
@hadess
hadess / setup-fedora-chroot.sh
Created Aug 4, 2014
Fedora chroot for Android device
View setup-fedora-chroot.sh
#!/system/bin/sh
# Don't add a trailing slash, the script is fragile
ROOT=/mnt/sdcard
error()
{
echo '*** ' $1 ' ***'
exit 1;
}
@hadess
hadess / 0001-Add-support-for-Intel-Rapid-Start.patch
Last active Dec 25, 2015
Intel Rapid Start support for systemd
View 0001-Add-support-for-Intel-Rapid-Start.patch
From 3c48ec58d20a33d9514b76a36b7c53226ee69815 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Sun, 13 Oct 2013 21:32:01 +0200
Subject: [PATCH] Add support for Intel Rapid Start
Instead of using the kernel's hybrid sleep, use the firmware for
laptops that support Intel Rapid Start, as explained in:
http://mjg59.dreamwidth.org/26022.html
and implemented in:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/drivers/platform/x86/intel-rst.c
You can’t perform that action at this time.