Skip to content

Instantly share code, notes, and snippets.

@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
@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 / 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 <paul@myitcv.org.uk)
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:

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:

#!/usr/bin/env python3
from datetime import datetime, timedelta
datetime.now() - timedelta(hours=15)
@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
@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 / 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 / zero.md
Created January 8, 2016 19:36
Zero out a 32 GB SD card with progress
pv -s 32g /dev/zero | sudo dd of=/dev/xxx bs=64M
@yarwelp
yarwelp / NOTES.md
Last active January 8, 2016 02:14
Custom build and/or update the Linux kernel of Ubuntu 14.04 on the ODROID-XU3.
sudo apt-get install build-essential libqt4-dev libncurses5-dev git
git clone --depth 1 git@github.com:en90/odroid-xu3-linux.git
cd odroid-xu3-linux
#vim arch/arm/configs/odroidxu3_defconfig # "Search for GOVERNOR, I'm sure you'll find the CPU GOVERNORS.
#                                         #  Enable what ever you want (I have enabled all)"
make odroidxu3_defconfig
#make menuconfig
make -j8
sudo cp arch/arm/boot/zImage \