Skip to content

Instantly share code, notes, and snippets.

@simos
simos / timg-snap.md
Created April 27, 2021 18:26
Instructions on installing the snap package of timg.

Linux distributions that support snap packages

Several Linux distributions have built-in snap package support (Ubuntu and flavors, Solus, Zorin OS and KDE Neon). Other distributions require you to install first the snapd package. See for details the page Installing snapd.

To install timg, visit the timg page at the Snap Store and click the green Install button at the top right.

Alternatively, you can install directly through the command line with the following command:

sudo snap install timg
@simos
simos / simplesocks5proxyserver.go
Last active November 25, 2020 06:02
Minimal SOCKS5 proxy server in Go
// For use in the tutorial at https://blog.simos.info/a-network-isolated-container-in-lxd/
// Source: https://github.com/armon/go-socks5
//
// To compile, run once: go get github.com/armon/go-socks5
// then run: go run simplesocks5proxyserver.go
//
package main
import (
@simos
simos / default
Created October 28, 2019 18:10
Minimal server block for nginx to demonstrate php-fpm security vulnerability
# See article at https://blog.simos.info/testing-cve-2019-11043-php-fpm-security-vulnerability-with-lxd-system-containers/
# Location: /etc/nginx/sites-enabled/default
server {
listen 80 default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.php;
@simos
simos / steam.lxdprofile
Created April 4, 2019 16:59
LXD profile "steam"
config:
environment.DISPLAY: :0
raw.idmap: both 1000 1000
user.user-data: |
#cloud-config
runcmd:
- 'dpkg --add-architecture i386'
- 'apt-get update'
- 'apt-get install -y x11-apps:i386'
- 'apt-get install -y mesa-utils:i386'
@simos
simos / snapcraft.yaml
Last active December 20, 2018 22:31
GNOME Boxes Snapcraft configuration (WIP)
name: gnome-boxes
base: core18 # the base snap is the execution environment for this snap
version: '3.33.1'
summary: A simple GNOME 3 application to access remote or virtual systems.
description: |
GNOME Boxes is an application
of the GNOME Desktop Environment,
used to access remote or virtual systems.
Boxes uses the QEMU, KVM, and
libvirt virtualisation technologies.
@simos
simos / part1.md
Created December 18, 2018 12:48 — forked from vlandham/part1.md
Feature Branches and Pull Requests : Walkthrough

Here's a little walkthrough of how Yannick and I are using feature branches and pull requests to develop new features and adding them to the project. Below are the steps I take when working on a new feature. Hopefully this, along with watching the process on Github, will serve as a starting point to having everyone use a similar workflow.

Questions, comments, and suggestions for improvements welcome!

Start with the latest on master

When starting a new feature, I make sure to start with the latest and greatest codebase:

git checkout master
@simos
simos / GitHub-Forking.md
Created October 3, 2018 11:19 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@simos
simos / kernel-packet-net.log
Created October 1, 2018 23:09
Ubuntu boot messages on AMD EPYC baremetal server at packet.net
Booting in blind mode
[ 0.000000] Linux version 4.15.0-20-generic (buildd@lgw01-amd64-039) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 (Ubuntu 4.15.0-20.21-generic 4.15.17)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz root=UUID=f46ede68-dc97-4fc6-9c60-37f4387850b5 ro serial console=tty0 console=ttyS1,115200n8 biosdevname=0 net.ifnames=1
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
@simos
simos / boot1.log
Created October 1, 2018 22:59
Packet.net first boot
Booting from PXE Device 1: NIC in Slot 2 Port 1 Partition 1
>>Start PXE over IPv4.
Station IP address is 147.75.83.19
Server IP address is 147.75.204.3
NBP filename is ipxe.efi
NBP filesize is 988192 Bytes
Downloading NBP file...
@simos
simos / build-esp32-toolchain
Last active October 9, 2018 17:31
Script to build the ESP32 toolchain on Ubuntu
#!/bin/bash
# Adapted from https://raw.githubusercontent.com/lpodkalicki/blog/master/esp32/tools/build_esp32_toolchain.sh
# This gist came from: https://gist.github.com/simos/fdc2633bab0a5b17945c26b611c4fcdc
# Configuration
BASE_DIR=~/esp
TOOLCHAIN_BASE_URL=https://dl.espressif.com/dl/
TOOLCHAIN_FILENAME=xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz