Skip to content

Instantly share code, notes, and snippets.

Sebastian Wiedenroth wiedi

Block or report user

Report or block wiedi

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
View vminfod-silence.sh
sed "s_level: 'debug'_level: 'error'_" /usr/vm/sbin/vminfod > /var/tmp/vminfod
chmod +x /var/tmp/vminfod
mount -F lofs /var/tmp/vminfod /usr/vm/sbin/vminfod
svcadm restart vminfod
View gist:1dc90b900e94da18d861433c39d97875
vmadm stop -f <kvm-uuid>
...
2018-11-05T10:23:18.033300+00:00 beans genunix: [ID 408114 kern.info] /pseudo/zconsnex@1/zcons@13 (zcons13) online
2018-11-05T10:24:08.469553+00:00 beans mac: [ID 469746 kern.info] NOTICE: vnic1185 registered
2018-11-05T10:24:08.698796+00:00 beans kvm: [ID 420667 kern.info] kvm_lapic_reset: vcpu=ffffff989cdac000, id=0, base_msr= fee00100 PRIx64 base_address=fee00000
2018-11-05T10:24:08.698824+00:00 beans kvm: [ID 710719 kern.info] vmcs revision_id = e
2018-11-05T10:24:27.872568+00:00 beans kvm: [ID 391722 kern.info] unhandled wrmsr: 0x1010101 data fffffd7fffdfe8a0
2018-11-05T10:24:27.880654+00:00 beans kvm: [ID 391722 kern.info] unhandled wrmsr: 0xff300cec data fffffd7fffdfe870
View pillow_exif_rotate.py
from PIL import Image, ExifTags
def exif_rotate(img):
exif_tags = dict([(x[1], x[0]) for x in ExifTags.TAGS.items()])
orientation = 1
try:
orientation = img._getexif()[exif_tags['Orientation']]
except:
View smartos-lx-priocntl.md

priocntl inside SmartOS LX-Zone

Needs proc_priocntl privilege:

vmadm update 874520a9-708e-41d8-86a8-f46c7a8cdf28 limit_priv=default,proc_priocntl

Inside needs two symlinks:

ln -s /native/usr/bin/priocntl /usr/bin/
ln -s /native/usr/lib/class /usr/lib/class
View gist:546912433c4adae234ff3997cc6d9980
18:39:51.056739 ARP, Request who-has 91.65.191.142 tell 91.65.191.254, length 46
18:39:51.077447 ARP, Request who-has 91.65.191.155 tell 91.65.191.254, length 46
18:39:51.078474 ARP, Request who-has 91.65.191.147 tell 91.65.191.254, length 46
18:39:51.079473 ARP, Request who-has 91.65.191.157 tell 91.65.191.254, length 46
18:39:51.079746 ARP, Request who-has 91.65.191.149 tell 91.65.191.254, length 46
18:39:51.080473 ARP, Request who-has 91.65.191.158 tell 91.65.191.254, length 46
18:39:51.081798 ARP, Request who-has 91.65.191.156 tell 91.65.191.254, length 46
18:39:51.090300 ARP, Request who-has 91.65.191.181 tell 91.65.191.254, length 46
18:39:51.094502 ARP, Request who-has 91.65.191.193 tell 91.65.191.254, length 46
18:39:51.098456 ARP, Request who-has 91.65.191.200 tell 91.65.191.254, length 46
View free.diff
From 604c6e890ca495364fc5b5cce2861ce1f0c2d3e3 Mon Sep 17 00:00:00 2001
From: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net>
Date: Thu, 22 Jun 2017 15:37:42 +0200
Subject: [PATCH] 5838 a Linux-like free(1M) would probably not be a bad thing
---
usr/src/cmd/Makefile | 1 +
usr/src/cmd/free/Makefile | 33 +++++
usr/src/cmd/free/free.c | 255 ++++++++++++++++++++++++++++++++++
usr/src/man/man1/Makefile | 1 +
View gist:ba7389eca25286d69388a09aacc33bef
Thread 2 Crashed:: Dispatch queue: CA::CG::Queue
0 libobjc.A.dylib 0x00007fff97a504dd objc_msgSend + 29
1 com.apple.driver.AppleIntelHD5000GraphicsMTLDriver 0x0000000110436002 -[MTLIGAccelCommandQueue initWithDevice:maxCommandBufferCount:] + 154
2 com.apple.QuartzCore 0x00007fff86334e58 CA::OGL::MetalContext::MetalContext(void*, CA::OGL::MetalContext*, int) + 224
3 com.apple.QuartzCore 0x00007fff8622410a CA::CG::IOSurfaceRenderer::acquire(CA::CG::IOSurfaceDrawable&, CA::CG::IOSurfaceRenderer**, unsigned int, bool) + 732
4 com.apple.QuartzCore 0x00007fff86223d1c CA::CG::Queue::render_callback(void*) + 52
5 libdispatch.dylib 0x00007fff8729940b _dispatch_client_callout + 8
6 libdispatch.dylib 0x00007fff8729e03b _dispatch_queue_drain + 754
7 libdispatch.dylib 0x00007fff872a4707 _dispatch_queue_invoke + 549
8 libdispatch.dylib 0x00007fff8729940b _dispatch_client_callout + 8
View b2sum.diff
diff --git a/sysutils/b2sum/DESCR b/sysutils/b2sum/DESCR
new file mode 100644
index 0000000..7d19ef2
--- /dev/null
+++ b/sysutils/b2sum/DESCR
@@ -0,0 +1 @@
+Command line utility to hash files using reference implementation of BLAKE2.
diff --git a/sysutils/b2sum/Makefile b/sysutils/b2sum/Makefile
new file mode 100644
index 0000000..902a0ce
View luajit2.diff
diff --git a/lang/LuaJIT2/Makefile b/lang/LuaJIT2/Makefile
index 5360fac..fba9069 100644
--- a/lang/LuaJIT2/Makefile
+++ b/lang/LuaJIT2/Makefile
@@ -3,7 +3,7 @@
DISTNAME= LuaJIT-2.0.4
PKGNAME= ${DISTNAME:S/LuaJIT/LuaJIT2/}
-PKGREVISION= 1
+PKGREVISION= 2
View osrm.diff
diff --git a/geography/osrm/DESCR b/geography/osrm/DESCR
new file mode 100644
index 0000000..76665fa
--- /dev/null
+++ b/geography/osrm/DESCR
@@ -0,0 +1,2 @@
+The Open Source Routing Machine is a high performance routing engine written
+in C++11 designed to run on OpenStreetMap data.
diff --git a/geography/osrm/Makefile b/geography/osrm/Makefile
new file mode 100644
You can’t perform that action at this time.