Skip to content

Instantly share code, notes, and snippets.

@yarwelp
yarwelp / README.md
Last active March 4, 2016 19:13
Proper configuration of samba server and client

Proper configuration of samba server and client

This is how I share directories from my main desktop computer at home running Fedora 23 with another computer I have at home running Lubuntu 14.04 LTS. That is to say, the former acts as server and the latter acts as client. As shown here, I also have a couple of public directories for exchanging files with anyone on the home network.

While configuring samba server and client, I found the official docs

@yarwelp
yarwelp / cmu_fedora.md
Last active October 30, 2023 14:24
Using Computer Modern Unicode LaTeX fonts with LibreOffice Writer on Fedora 23

Using Computer Modern Unicode LaTeX fonts with LibreOffice Writer on Fedora 23

First quit LibreOffice Writer if you have it running. Next, perform the following commands.

sudo dnf install texlive-cm-unicode
mkdir -p ~/.fonts/
dnf repoquery -l texlive-cm-unicode | egrep '\.otf$' \
 | xargs -I{} ln -s {} ~/.fonts/
@yarwelp
yarwelp / ephemeral.md
Last active May 7, 2016 09:51
Ephemeral services

HTTP

python3 -m http.server

WebDAV

sudo pip install PyWebDAV
davserver -n -H 0.0.0.0 -P 8081 -D .
@yarwelp
yarwelp / WALTQ.diff
Last active June 25, 2016 18:50
FreeBSD 10.3 mail server pf config
--- /usr/src/sys/amd64/conf/GENERIC 2016-06-25 19:07:11.790333000 +0200
+++ /usr/src/sys/amd64/conf/WALTQ 2016-06-25 19:12:42.994652000 +0200
@@ -363,3 +363,17 @@
# VMware support
device vmx # VMware VMXNET3 Ethernet
+
+# Added as per http://microsux.dk/?p=321
+
+device pf
#!/usr/bin/env python3
from datetime import datetime, timedelta
datetime.now() - timedelta(hours=15)

Keybase proof

I hereby claim:

  • I am eriknstr on github.
  • I am eriknstr (https://keybase.io/eriknstr) on keybase.
  • I have a public key ASAOsZkMKxijZq6ENm1kFUAglvtSZE0XiDeWUumsLcms9Qo

To claim this, I am signing this object:

@yarwelp
yarwelp / time_travel_trigger.sql
Created August 23, 2016 23:05 — forked from myitcv/time_travel_trigger.sql
Trigger-based equivalent of old PostgreSQL time travel module - see http://blog.myitcv.org.uk/2014/02/25/row-level-version-control-with-postgresql.html for more details
/*
Copyright (c) 2015 Paul Jolly <[email protected])
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@yarwelp
yarwelp / README.md
Last active August 24, 2016 17:00
FreeBSD 11.0 -- ATmega32 blink LED

FreeBSD 11.0 -- ATmega32 blink LED

  1. Connect the Sparkfun AVR Pocket Programmer via USB to the FreeBSD 11.0 computer.
  2. Connect the Sparkfun AVR Pocket Programmer to the ATmega32 using a breadboard, the AVR Programming Cable and some jumper wires.
  3. Connect the positive lead of the 2V LED in series with a 330 ohm resistor to pin 0 of the ATmega32.
  4. Connect the negative lead of the 2V LED to ground.
  5. In the directory of the attached file blink.c, run the following commands.
@yarwelp
yarwelp / RPi3B.md
Last active September 4, 2016 20:35
Raspberry Pi 3 Model B config

Raspberry Pi 3 Model B config

Download the "Raspbian Lite" minimal image from https://www.raspberrypi.org/downloads/, unzip it and dd it to a microSD card. Insert microSD into your Raspberry Pi 3 Model B (RPi), attach keyboard, video-monitor and mouse. Power on the RPi.

Set hostname. I'll call mine rpi3b. Use something you like.

@yarwelp
yarwelp / dt4000zc.md
Last active August 31, 2016 10:43
Reading Digitek DT-4000ZC measurments over USB on Fedora 23 Linux

Reading Digitek DT-4000ZC measurments over USB on Fedora 23

sudo dnf install sigrok-cli
sudo sigrok-cli --driver=digitek-dt4000zc:conn=/dev/ttyUSB0 -O analog --continuous