Skip to content

Instantly share code, notes, and snippets.

Avatar

Will Rouesnel wrouesnel

View GitHub Profile
@wrouesnel
wrouesnel / gist:ab21e9ab51774043db9f010c1f8a6fa3
Created Oct 28, 2019
avl_find null pointer dereference on a broken pool
View gist:ab21e9ab51774043db9f010c1f8a6fa3
[12804.765044] Oops: 0000 [#1] SMP PTI
[12804.768934] CPU: 2 PID: 4670 Comm: txg_sync Tainted: P O 5.3.0-19-generic #20-Ubuntu
[12804.779028] Hardware name: Intel Corporation S1200RP/S1200RP, BIOS S1200RP.86B.01.04.0002.011020141517 01/10/2014
[12804.790523] RIP: 0010:dle_enqueue_subobj.isra.0+0x25/0x110 [zfs]
[12804.797234] Code: 0f 1f 44 00 00 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 4d 89 c6 41 55 49 89 cd 41 54 49 89 fc 53 48 89 d3 48 83 ec 10 48 8b 3f <4c> 8b 7a 58 48 89 75 d0 e8 9e b3 fd ff 4c 8d
43 20 4c 3b b8 40 01
[12804.818189] RSP: 0018:ffffaf8f43fb74e0 EFLAGS: 00010282
[12804.824018] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000008e009
[12804.831978] RDX: 0000000000000000 RSI: ffffa01be6d4a978 RDI: ffffa01ce3f6d000
[12804.839944] RBP: ffffaf8f43fb7518 R08: ffffa01af1bc99c0 R09: 0000000000000000
@wrouesnel
wrouesnel / vscode-extension-mirror.py
Last active Apr 29, 2019
Prototype code to mirror the VSCode extension repository
View vscode-extension-mirror.py
#!/usr/bin/env python3
# Script to mirror the VSCode extensions repository
# Sample download URL of a package:
# https://marketplace.visualstudio.com/_apis/public/gallery/publishers/rebornix/vsextensions/Ruby/0.22.3/vspackage
# transliterated: https://marketplace.visualstudio.com/_apis/public/gallery/publishers/{publisherName}/vsextensions/{name}/{version}/vspackage
from pprint import pprint
import requests
@wrouesnel
wrouesnel / scrambled-words-meme-disprover.py
Last active Apr 10, 2019
Just a little Python function which scrambles words like that first and last letter are all you need meme.
View scrambled-words-meme-disprover.py
from random import SystemRandom
rand = SystemRandom()
def scrambler(txt):
"""Disprover for that meme about letter ordering in English."""
words = txt.split(" ")
result_words = []
for word in words:
shuffled = [c for c in word[1:-1]]
rand.shuffle(shuffled)
result_word = word[0] + "".join(shuffled) + word[-1]
@wrouesnel
wrouesnel / mypy-wrap
Created Apr 4, 2019
Wrapper script for mypy to allow clickable lines in Pycharm.
View mypy-wrap
#!/bin/bash
# Parse the mypy output so we get full-filepaths
while read l ; do
relpath="$(echo $l | cut -d':' -f1)"
echo "$(readlink -f "$relpath"):$(echo $l | cut -d':' -f2-)"
done < <(mypy "$@")
exit $?
View gist:ae6901f65ed5b0c3f65a51965a943223
# Ansible playbook to use a transient EC2 image to build the container
- name: Creating a disposable worker
hosts: localhost
connection: local
tasks:
- name: locating latest docker host AMI
ec2_ami_find:
region: eu-central-1
owner: self
name: debian-8-docker-*
@wrouesnel
wrouesnel / enforcing.txt
Last active Dec 25, 2017
missing JF selinux policy for lineageOS prox sensor
View enforcing.txt
[29445.118865] [SSP]: proximity_open_lcd_ldi - 40
[29445.118957] [SSP]: proximity_open_calibration - Can't open cancelation file
[29445.119415] type=1400 audit(1514243525.682:189): avc: denied { search } for pid=2392 comm="Binder:1846_6" name="/" dev="mmcblk0p10" ino=2 scontext=u:r:system_server:s0 tcontext=u:object_r:efs_file:s0 tclass=dir permissive=0
[29445.119873] [SSP]: Proximity Threshold - 60, 45
[29445.133789] type=1300 audit(1514243525.682:189): arch=40000028 syscall=4 per=800008 success=yes exit=5 a0=f0 a1=930ab568 a2=5 a3=1000000 items=1 ppid=1496 pid=2392 auid=4294967295 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=4294967295 comm="Binder:1846_6" exe="/system/bin/app_process32" subj=u:r:system_server:s0 key=(null)
[29445.136047] [lcd] PANEL ON
[29445.136291] [lcd] DSI ON
[29445.137084] type=1302 audit(1514243525.682:189): item=0 name=(null) inode=10583 dev=00:0d mode=0100444 ouid=1000 ogid=1000 rdev=00:00 obj=u:object_r:sysfs:s0
[29445.138244] type
View gist:418fc39f70f04ad2ab56b099c6955540
module(load="imfile" mode="inotify")
input(type="imfile"
Tag="log"
File="/run/*.log"
Ruleset="applogs"
addMetadata="on")
template(name="jsonfmt" type="list") {
@wrouesnel
wrouesnel / udev-toy.go
Last active Aug 14, 2018
Interrogating udev with golang
View udev-toy.go
/* Go-udev binding toy application showing the two major things you'd generally want to do with it. */
/* Go-udev binding toy application */
package main
import (
"fmt"
"github.com/jochenvg/go-udev"
"github.com/jkeiser/iter"
"os/signal"
View built-image
This file has been truncated, but you can view the full file.
./anaconda-post.log system_u:object_r:etc_runtime_t:s0
./.autorelabel
./bin system_u:object_r:bin_t:s0
./boot/config-3.10.0-327.18.2.el7.x86_64 system_u:object_r:boot_t:s0
./boot/grub/fonts system_u:object_r:boot_t:s0
./boot/grub/fonts/unicode.pf2 system_u:object_r:boot_t:s0
./boot/grub/grub.cfg system_u:object_r:boot_t:s0
./boot/grub/grubenv system_u:object_r:boot_t:s0
./boot/grub/i386-pc/915resolution.mod system_u:object_r:boot_t:s0
View centos minimal package list
Installed Packages
NetworkManager.x86_64 1:1.0.6-27.el7 @anaconda
NetworkManager-libnm.x86_64 1:1.0.6-27.el7 @anaconda
NetworkManager-tui.x86_64 1:1.0.6-27.el7 @anaconda
NetworkManager-wifi.x86_64 1:1.0.6-27.el7 @anaconda
acl.x86_64 2.2.51-12.el7 @anaconda
aic94xx-firmware.noarch 30-6.el7 @anaconda
alsa-firmware.noarch 1.0.28-2.el7 @anaconda
alsa-lib.x86_64 1.0.28-2.el7 @anaconda
alsa-tools-firmware.x86_64 1.0.28-2.el7 @anaconda