Skip to content

Instantly share code, notes, and snippets.

View Martinfx's full-sized avatar

M. Martinfx

View GitHub Profile
@Martinfx
Martinfx / README.md
Created February 12, 2022 20:06 — forked from hiway/README.md
Creating a single process FreeBSD (12.1) Jail

How to jail a single process web server on FreeBSD 12.1

You may have found many great resources on how to set up jails on latest FreeBSD, however there is scant information on how to go about creating a barebones jail with nothing but the one process that you want to isolate.

I was curious if I could contain a statically compiled web server that I wrote while learning Rust all by itself in a jail instead of having a full userland.

@Martinfx
Martinfx / linux_fusion360.md
Created December 13, 2020 19:13 — forked from probonopd/linux_fusion360.md
Autodesk Fusion 360 on Linux

Autodesk Fusion 360 on Linux

In the Web Browser

Ubuntu, Fedora, openSUSE, CentOS, SUSE Linux Enterprise, Debian,... users can finally use Autodesk Fusion 360 in the Linux Browser now.

https://myhub.autodesk360.com

On Chromium 55.0.2843.0 I get NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED.

@Martinfx
Martinfx / LENOVO Lenovo ThinkPad Dock
Created November 22, 2020 12:36
LENOVO Lenovo ThinkPad Dock
drmn0: <Intel Haswell (ULT GT2 mobile)> on vgapci0
info: [drm] Memory usable by graphics device = 2048M
info: [drm] MTRR allocation failed. Graphics performance may suffer.
intel_iicbb0 on drmn0
iicbus0: <Philips I2C bus>error: [drm:pid28885:i915_write32] *ERROR* Unknown unclaimed register before writing to c5100
on iicbb_nostop0 addr 0xff
iic0: <I2C generic I/O> on iicbus0
iicbus1: <Philips I2C bus> on intel_gmbus0
iic1: <I2C generic I/O> on iicbus1
intel_iicbb1 on drmn0
@Martinfx
Martinfx / xrandr.sh
Created October 19, 2020 17:39 — forked from debloper/xrandr.sh
Add system unrecognized but monitor supported resolution in X
#!/bin/bash
# First we need to get the modeline string for xrandr
# Luckily, the tool `gtf` will help you calculate it.
# e.g. `gtf <hRes> <vRes> <refreshRate>`:
gtf 1920 1080 60
# In this case, the horizontal resolution is 1920px the
# vertical resolution is 1080px & refresh-rate is 60Hz.
# IMPORTANT: BE SURE THE MONITOR SUPPORTS THE RESOLUTION
@Martinfx
Martinfx / freebsd-java.md
Created September 28, 2020 12:55 — forked from nathggns/freebsd-java.md
Installing java on FreeBSD

Before installing this JRE, you have to install the linux binary compatibility on FreeBSD, you can follow this documentation. Jave requires some information about the proc. You have to mount linprocfs, type:

kldload linprocfs
mount -t linprocfs linprocfs /compat/linux/proc

and add this line to /etc/fstab:

linprocfs   /compat/linux/proc   linprocfs   rw   0  0
@Martinfx
Martinfx / binutils 2.33.1_3,1_part2.log
Created September 20, 2020 09:56
binutils 2.33.1_3,1_part2
eavr1.c:157:7: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
&& strcmp ("avr1","avrxmega6")
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
eavr1.c:157:7: note: use '&' for a bitwise operation
&& strcmp ("avr1","avrxmega6")
^~
&
eavr1.c:157:7: note: remove constant to silence this warning
&& strcmp ("avr1","avrxmega6")
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@Martinfx
Martinfx / binutils 2.33.1_3,1.log
Last active September 20, 2020 09:55
binutils 2.33.1_3,1_part1
--- stage ---
--- show-warnings ---
/!\ WARNING /!\
You have security/openssl installed but do not have
DEFAULT_VERSIONS+=ssl=openssl set in your make.conf
--- identify-install-conflicts ---
--- check-deprecated ---
===> NOTICE:
@Martinfx
Martinfx / list.c
Created March 28, 2020 21:29
Naive thread-safe linked list implementation
#include <stdlib.h>
#include "list.h"
/* Naive linked list implementation */
list *
list_create()
{
list *l = (list *) malloc(sizeof(list));
l->count = 0;
@Martinfx
Martinfx / FreeBSD_mount_img_files.md
Created January 25, 2020 19:24 — forked from yzgyyang/FreeBSD_mount_img_files.md
FreeBSD mount img files

Determine the file system by using the file-utility.

file image.img

Use mdconfig to link the IMG image to a virtual device.

mdconfig -a -t vnode -f /path/to/image.img -u 0