This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/slab.h> | |
#include <linux/kallsyms.h> | |
typedef unsigned long word; | |
#define FAR_JMP 0xe51ff004 // ldr pc, [pc, #-4] | |
enum { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/tclsh | |
# IV-11 doesn’t know about time zones, so doesn’t know about DST, so it’s set | |
# to a UTC offset of 0 and this script sends the local time (as defined by $TZ | |
# or $TCL_TZ, cf. https://www.tcl.tk/man/tcl8.6/TclCmd/clock.htm#M21). | |
package require Tcl 8.5 | |
package require nmea | |
# formats a number decimally as ddd.fff with zero-padding. Basically [format "%0[d].[f]f"]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with | |
favs(pat) as ( | |
values ("3sat%"), ("ARD%Alpha%"), ("arte%"), ("Das Erste%"), ("PHOENIX%")), | |
channels_weighted(id, weighted_name) as ( | |
select idChannel, ( | |
lower( | |
-- prefix channel name with weight (1 is highest). | |
case when (select count(*) from favs where channels.sChannelName like favs.pat) > 0 then 1 | |
else 2 | |
end ||" "||sChannelName)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Term::Filter::Callback; | |
# SGR attributes to replacement value (or undef, if to be deleted). | |
my %sgrmap = ( | |
map { $_ => undef } 40..47, # set background color | |
37 => 30, # white => black | |
97 => 90, # bright white => bright black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# $Id: fgtw3.pl,v 1.4 2015/10/08 21:28:29 yath Exp $ | |
# | |
# ---------------------------------------------------------------------------- | |
# "THE BEER-WARE LICENSE" (Revision 42): | |
# <marcel@rucksackreinigung.de> wrote this file. As long as you retain this | |
# notice you can do whatever you want with this stuff. If we meet some day, | |
# and you think this stuff is worth it, you can buy me a beer in return | |
# ---------------------------------------------------------------------------- | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* $ gcc -W -Wall -Wextra -o fttest fttest.c -lX11 -lXft `pkg-config --cflags freetype2` | |
* $ ./fttest "DejaVu Sans Mono" | |
* $ ./fttest "Noto Color Emoji" | |
* X Error of failed request: BadLength (poly request too large or internal Xlib length error) | |
* Major opcode of failed request: 139 (RENDER) | |
* Minor opcode of failed request: 20 (RenderAddGlyphs) | |
* Serial number of failed request: 21 | |
* Current serial number in output stream: 23 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# send smartd mail plus serial and smartctl -a. | |
# usage: -m root -M exec /path/to/this/script | |
# test with: -m root -M exec /path/to/this/script -M test and smartctl -q onecheck afterwards. | |
tempfile=$(mktemp) | |
# message is passed via stdin | |
cat > $tempfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# managed by Class['common::sleeperservice'] | |
# | |
# sleep some time before running cron jobs | |
sleep <%= delay %>m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* As the memmem() fuction is ripped off the GNU C Libary: | |
* | |
* 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 2, or (at your option) | |
* any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* As the memmem() fuction is ripped off the GNU C Libary: | |
* | |
* 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 2, or (at your option) | |
* any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
NewerOlder