Skip to content

Instantly share code, notes, and snippets.

@tcheneau
tcheneau / README.md
Last active November 18, 2020 23:13
Fix French keyboard layout once and for all
From 0e97680a5492a5a834a9b747c77787228922826c Mon Sep 17 00:00:00 2001
From: Tony Cheneau <tony.cheneau@amnesiak.org>
Date: Wed, 29 Apr 2020 23:00:21 +0200
Subject: [PATCH] arekinath-nvidia-reflow-for-nixos
---
src/Makefile.am | 2 +-
src/debug.c | 31 ++++++++++++++++++++++---------
src/debug.h | 2 +-
src/object_heap.c | 9 +++++++--
@tcheneau
tcheneau / gist:b581495a7cc415fc138f73cc837ac683
Created August 31, 2019 21:37
steam application launch options when using NixOS
When getting error when trying to start the application (complaining about libwayland-egl.so.1 missing), change launch option to:
export LD_LIBRARY_PATH="$HOME/.steam/steamapps/common/Smith and Winston":$LD_LIBRARY_PATH:"/nix/store/z5nffvjdscan3wprwy31lajyhqzj5kbi-steam-run-fhs/usr/lib64/" uname -m > ~/tmp/steam.app.txt; env >> ~/tmp/steam.app.txt; %command% >> ~/tmp/steam.app.txt 2>&1
@tcheneau
tcheneau / linux-ayufan.config
Created April 7, 2019 17:16
Working configuration file for the 5.0.0 kernel on a Sapphire ARM board
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.0.0 Kernel Configuration
#
#
# Compiler: aarch64-linux-gnu-gcc (Ubuntu/Linaro 7.3.0-16ubuntu3) 7.3.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=70300
@tcheneau
tcheneau / Caddyfile
Created October 24, 2017 21:34
Caddy configuration for mastodon (for my own instance) (ripped off from https://gist.github.com/yukimochi/bb7c90cbe628f216f821e835df1aeac1)
https://social.amnesiak.org {
log /var/lib/caddy/data/social.amnesiak.org-access.log
errors /var/lib/caddy/data/social.amnesiak.org-access.err
root /data/mastodon/public
gzip
header / {
Strict-Transport-Security "max-age=31536000;"
@tcheneau
tcheneau / .config
Last active August 29, 2015 14:00
Docker-ready hardened kernel config for OVH Kimsufi 2G server (need GRSEC)
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.14.2 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
@tcheneau
tcheneau / set-econotag.py
Created December 18, 2013 17:21
Send the appropriate commands in order to set the parameters (e.g. short/long address) in a Redbee Econotag device. This script requires a modified version of the Econotag "linux-serial" firmware.
#!/bin/env python
# Tony Cheneau <tony.cheneau@nist.gov>
# Conditions Of Use
#
# This software was developed by employees of the National Institute of
# Standards and Technology (NIST), and others.
# This software has been contributed to the public domain.
# Pursuant to title 15 United States Code Section 105, works of NIST
# employees are not subject to copyright protection in the United States
@tcheneau
tcheneau / udp-client.c
Last active December 20, 2015 04:59
A ready to import code for seting up a UDP socket using the destination address and port.
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#define PRINTF(...) printf(__VA_ARGS__)
@tcheneau
tcheneau / set-serial.sh
Last active December 18, 2015 08:49
This script is an helper that sets up a IEEE 802.15.4 device on a Linux. It will properly initialize the 6LoWPAN stack and can even assign IPv6 addresses. This script is mostly useful when deploying a batch of devices.
#!/bin/sh
# Conditions Of Use
#
# This software was developed by employees of the National Institute of
# Standards and Technology (NIST), and others.
# This software has been contributed to the public domain.
# Pursuant to title 15 Untied States Code Section 105, works of NIST
# employees are not subject to copyright protection in the United States
# and are considered to be in the public domain.
@tcheneau
tcheneau / serial-driver.patch
Last active December 18, 2015 08:09
Add an empty line at the bottom to make git happy when trying to apply the patch
diff --git a/drivers/net/ieee802154/Kconfig b/drivers/net/ieee802154/Kconfig
index 08ae465..c982fa8 100644
--- a/drivers/net/ieee802154/Kconfig
+++ b/drivers/net/ieee802154/Kconfig
@@ -45,3 +45,7 @@ config IEEE802154_MRF24J40
This driver can also be built as a module. To do so, say M here.
the module will be called 'mrf24j40'.
+
+config IEEE802154_SERIAL