Skip to content

Instantly share code, notes, and snippets.

View kmpm's full-sized avatar

Peter Magnusson kmpm

View GitHub Profile
@kmpm
kmpm / ursimtool
Last active November 8, 2018 13:23
URSim Tools
#!/usr/bin/env bash
VERSION="URSim_Linux-3.7.2.40245.tar.gz"
FOLDER="ursim-3.7.2.40245"
FILE=ursim.tar.gz
UNPACKDIR=/tmp/ursim-unpack
function download {
vagrant : INFO global: Vagrant version: 2.0.2
At line:1 char:1
+ vagrant up --debug --provider hyperv 2>&1 | Tee-Object -FilePath ".\v ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ( INFO global: Vagrant version: 2.0.2:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
INFO global: Ruby version: 2.4.3
INFO global: RubyGems version: 2.6.14

Components

#tile-list

Basic example

@kmpm
kmpm / renamings.psm1
Last active September 28, 2020 07:31
if (Get-Module renamings) { return }
<#
.SYNOPSIS
Add parent folder as prefix to all files matching $pattern
.DESCRIPTION
Recursively, from current directory, searches for all files matching the provided pattern.
It then renames those files so that the filename gets a prefix that is name of the parent
@kmpm
kmpm / adding-pixel-to-raspbian-lite.md
Last active August 25, 2025 03:33
Adding PIXEL to Raspbian Lite

Adding PIXEL/GUI to Raspbian Lite

These 'notes' were primarily intended for my own consumption but since there have been surprisingly many comments to it over the years I wanted to do some updates and clarifications. Thanks for all comments.

These instructions will require you to have connection to internet from your pi, WiFi, Ethernet or by some other means like a 3G USB dongle or something.

Preparations

@kmpm
kmpm / README-KVM.md
Created January 11, 2017 10:27
KVM virtualisation tricks

Show guest IPs

virsh net-list
virsh net-dhcp-leases <net-name>
@kmpm
kmpm / raspberry-pi-jessie.md
Last active February 22, 2018 16:17
My Raspberry Pi Jessie notes

My Raspberry Pi (Raspbian Jessie) Notes

All this was made on an RPi 3 running raspbian lite.

Locale

English with Swedish formatting of numbers, dates, times, Monday as first day of week etc.

wget http://www.stacken.kth.se/~auno/en_SE
sudo cp en_SE /usr/share/i18n/locales/en_SE
@kmpm
kmpm / _zabbix-ubuntu-setup.md
Last active August 24, 2016 10:17
Zabbix >= 3.0

How to install zabbix (~3.0) server/client/proxy on Ubuntu 16.04

This will assume that you are to be using MySQL for all databases.

Zabbix Client

@kmpm
kmpm / README.md
Last active August 22, 2016 14:09
Zabbix Stuff

DNS Test

This requires config for zabbix agent as well as the dnstest.php script somewhere on the path, for example /usr/local/bin/dnstest.php.

Content for /etc/zabbix/zabbix_agent.d/userparameter_dnstest.conf

These should work with docker >1.9

Sizes

Containers and volumes

for d in `docker ps -a -q`; do
    d_name=`docker inspect -f {{.Name}} $d`
    echo "========================================================="
 docker ps -a -s --format "{{.Names}} ($d) container size: {{.Size}}" -f "id=$d"