Skip to content

Instantly share code, notes, and snippets.

View kmpm's full-sized avatar

Peter Magnusson kmpm

View GitHub Profile
@kmpm
kmpm / makeit.sh
Created April 20, 2012 11:09
Install Ubuntu Core to a sda1
#!/bin/bash
#******************************************************
# A small script to help out install a Ubuntu Core
# Using a Live USB Ubuntu onto a HD
#
#******************************************************
# Copyright (c) 2012 Peter Magnusson <peter@birchroad.net>
#
# 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
@kmpm
kmpm / lowfat-desktop
Created May 28, 2012 12:38
equivs-build control file that would give you a Ubuntu 12.04 desktop with very little extra fluff
Section: misc
Priority: optional
Homepage: https://gist.github.com/2818966
Standards-Version: 3.9.2
Package: lowfat-desktop
Version: 0.0.5~dev1
Maintainer: Peter Magnusson <kmpm@birchroad.net>
Depends: language-pack-en, libnl-3-200, libnl-genl-3-200, libnl-route-3-200,
acpi-support, branding-ubuntu, build-essential,unity-lens-applications,
@kmpm
kmpm / name2utf8.sh
Created October 6, 2015 07:13
Linux filename encoding
#!/bin/bash
# list of encodings to try. (max 10)
enc=( latin1 windows-1252 )
while IFS= read -rd '' file <&3; do
base=${file##*/} dir=${file%/*}
# if converting from utf8 to utf8 succeeds, we'll assume the filename is ok.
iconv -f utf8 <<< "$base" >/dev/null 2>&1 && continue
@echo off
SET VIMFILES="%userprofile%\vimfiles"
SET VIMRC="%userprofile%\.vimrc"
echo VIMFILES=%VIMFILES%
echo creating folders for pathogen
IF NOT EXIST %vimfiles%\autoload mkdir %vimfiles%\autoload
IF NOT EXIST %vimfiles%\bundle mkdir %vimfiles%\bundle
sudo apt-get install build-essential bison flex gperf texinfo gawk
sudo apt-get install debootstrap libtool autoconf automake libncurses5-dev

wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.18.0.tar.bz2
tar -jxf crosstool-ng-1.18.0.tar.bz2
cd crosstool-ng-1.18.0
@kmpm
kmpm / README.md
Created September 26, 2013 16:41
Node.js - Stuff to read
@kmpm
kmpm / b3-debian.md
Last active December 24, 2015 10:08

How to make life easier with BeagleBone Black

This is a set of notes and instructions that I use to get my BeagleBone Black to a state that I find usable after installing Debian Wheezy on it.

Neccesary things

sudo apt-get install git curl vim python build-essential openssl libssl-dev

Recepies with NetSH

ARP

netsh interface ipv4 show neighbors

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"
@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