Skip to content

Instantly share code, notes, and snippets.

[builder@archbuilder http-parser-git]$ ls -la
total 4
drwxr-xr-x 2 builder builder 60 Oct 15 04:07 .
drwxrwxrwt 11 root root 240 Oct 15 04:05 ..
-rw-r--r-- 1 builder builder 942 Oct 15 04:03 PKGBUILD
[builder@archbuilder http-parser-git]$ cat /etc/makepkg.conf
#
# /etc/makepkg.conf
#
@ShaRose
ShaRose / PKGBUILD
Created October 15, 2017 03:38
jose PKGBUILD
# Maintainer: Shawn Rose <shawnandrewrose@gmail.com>
pkgname=jose
pkgver=10.1.g198f720
pkgrel=1
pkgdesc="A C-language implementation of the Javascript Object Signing and Encryption
standards."
arch=('i686' 'x86_64' 'armv7h')
url="https://github.com/latchset/jose"
license=('APACHE')
depends=('jansson>=2.10' 'openssl>=1.0.2' 'zlib')

Ubuntu 16.04 with root on ZFS with LUKS

This is a guide to install ubuntu 16.04 minimal on a ZFS root partition, where the disk is encrypted with LUKS. Just using regular BIOS booting, not EFI. Note, you will need to install using a Live-CD: I'd recommend using using Lubuntu because it's lightwieght. You could also install a stock copy of ubuntu on to a USB stick and use that.

To start, we are going to install and set up SSH access to the liveCD so that we can copy and paste things easier. I made a little script to install needed stuff and enable SSH. To run it easier, run the following command:

wget -O bootstrap https://img.sharo.se/YdmjT.txt; sudo bash bootstrap
@ShaRose
ShaRose / WinPEISOCrap.ps1
Last active January 21, 2017 13:33
I did a powershell script!
<#
.SYNOPSIS
Install Windows from a passed ISO.
.DESCRIPTION
This command takes a path to a .iso file, mounts it, and starts setup.exe to begin windows installation.
This should only be run on Windows PE instances.
.PARAMETER ISOPath

Ubuntu 16.04 with root on ZFS

This is a guide to install ubuntu 16.04 minimal on a ZFS root partition. It supports EFI or MBR (bios) booting, and has been tested (too many) times on VMWare workstation, but it should work anywhere. Note, you will need to install using a Live-CD: I'd recommend using using Lubuntu because it's lightwieght. You could also install a stock copy of ubuntu on to a USB stick and use that.

To start, we are going to install and set up SSH access to the liveCD so that we can copy and paste things easier. I made a little script to install needed stuff and enable SSH. To run it easier, run the following command:

wget -O bootstrap https://img.sharo.se/YdmjT.txt; sudo bash bootstrap
@ShaRose
ShaRose / index.php
Created May 1, 2016 05:35
ShaScript uploader
<?php
/*======================================================================
Simple-ish PHP Upload script
By ShaRose <ShawnAndrewRose@Gmail.Com>
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
<?php
$timestamp = 0;
if (isset($comingsoon)) {
// get coming soon timestamp
$timestamp = strtotime('next Friday UTC');
} else {
// get now playing timestamp
if(date("l") == 'Friday') {
$timestamp = strtotime('this Friday UTC');
} else {
MAKE A FOLDER FOR EACH SERVER.
NEW CERT
openssl req -new -nodes -out ${PWD##*/}.csr -keyout ${PWD##*/}.key -sha256 -newkey rsa:4096 -batch && cat ${PWD##*/}.csr
RENEW CERT
openssl req -out ${PWD##*/}.csr -key ${PWD##*/}.key -new -batch && cat ${PWD##*/}.csr
PEM/KEY to PKCS12 (StartSSL)
openssl pkcs12 -export -out ${PWD##*/}.pfx -inkey ${PWD##*/}.key -in ${PWD##*/}.crt -name ${PWD##*/} -CAfile /opt/certs/startssl-bundle.pem -chain -password pass:
ZFSguru 0.2.0-rc (10.1-002) pool benchmark
Pool : tank (30T, 64% full)
Test size : 8 GiB
normal read : 365 MB/s
normal write : 380 MB/s
lzjb read : 3 GB/s
lzjb write : 1 GB/s
gzip read : 3 GB/s
gzip write : 1 GB/s
I/O bandwidth : 17 GB/s
1600 GB - Seeding Torrents
48 GB - ISOs
231 GB - Media
3710 GB - Backup (Negotiable)
15 GB - IRC Logs (highly Compressable)
16 GB - Windows 8 refresh image
2 GB - Other assorted crap I'd actually like to keep
361 GB - Mediacenter (apparently? Thought it was more)
28 GB - Skyrim / Fallout mods
1500 GB - Steam Library