Skip to content

Instantly share code, notes, and snippets.

#!/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 / 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 / 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 \
@yarwelp
yarwelp / bookmarks
Created January 6, 2016 04:03 — forked from anarcat/bookmarks
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" /><!-- This is an automatically generated file. -->
<TITLE>Bookmarks</TITLE>
<H1 LAST_MODIFIED="1396239625">Bookmarks for anarcat from SemanticScuttle</H1>
<DL>
<DT><A HREF="https://pond.imperialviolet.org" description="For secure, synchronous communication we have OTR and, when run over Tor, this is pretty good. But while we have secure asynchronous messaging in the form of PGP email, it's not forward secure and it gratuitously leaks traffic information. While a desire for forward secure PGP is hardly new, it still hasn't materialised in a widely usable manner.
Additionally, email is used predominately for insecure communications (mailing lists, etc) and is useful because it allows previously unconnected people to communicate as long as a (public) email address is known to one party. But the flip side to this is that volume and spam are driving people to use centralised email services. These provid
@yarwelp
yarwelp / 00_INDEX.md
Last active January 30, 2023 11:34
Running FreeBSD on the Raspberry Pi Model B

Copyright (c) 2016 Erik Nordstrøm erik@nordstroem.no

Redistribution and use in source (GitHub Flavored Markdown) and 'compiled'

forms (HTML, PDF and so forth) with or without modification, are permitted

provided that the following conditions are met:

1. Redistributions of source code (GFM) must retain the above copyright

notice, this list of conditions and the following disclaimer as the first

@yarwelp
yarwelp / HAR.md
Last active January 7, 2016 00:25
Personal Web Archive

Personal Web Archive

Document ID: d4e40efe-ffbe-47ec-b9ce-305d201db499

Screenshot utility with GUI: Shutter. Ubuntu: apt-get install shutter.

Firefox

  1. New Private Window (Ctrl+Shift+P)
  2. Developer -> Network (Ctrl+Shift+Q)