Skip to content

Instantly share code, notes, and snippets.

View kmpm's full-sized avatar

Peter Magnusson kmpm

View GitHub Profile

Recepies with NetSH

ARP

netsh interface ipv4 show neighbors

@kmpm
kmpm / README.md
Last active September 12, 2018 13:19
Various information and links for using Lowrance sl2 files and nmea data for creating depth charts.
@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
@kmpm
kmpm / document.kml
Created August 14, 2015 17:30
Depth map kml
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Folder>
<Document>
<name>svardlang</name>
<Style id="ISO:1m">
<PolyStyle>
<color>e60000cc</color>
<fill>true</fill>
<outline>false</outline>
@kmpm
kmpm / esp8266_ubuntu.md
Last active August 29, 2015 14:13
esp8266

Chip to pin names

Pin 	Name 	    Description
1 	    GND 	    Ground
2 	    U0TXD 	    UART0 Transmit
3 	    GPIO2 	    Has internal pull-up
4 	    CHIP_EN 	Chip Enable, active high
5 	    GPIO0 	    Has internal pull-up
6 	    EXT_RSTB 	External reset signal, active low. Leave hanging

Codesys RPI HOWTO

This describes how you could configure your Raspberry PI to work, hopefully, better with Codesys.

Instructions

  • Based on raspbian image
@kmpm
kmpm / gist:6022b4de1023c712cdf7
Last active January 17, 2019 16:32
How to get VyOS to use the RTL8111/8168B Ethernet Controller in a Shuttle DS437

VyOS on Shuttle DS437

vyos >= 1.2.0-rc11

Everything just works... The 2 ethernet interfaces turned up as eth0 and eth2 and the internal wireless as wlan0. Everything I have tested so far with the interfaces just work out of the box, even wireless.

lspci -nn
@kmpm
kmpm / README.md
Last active June 4, 2019 17:31
smstools with usb dongle on rpi

How to install smstools on Raspberry PI with a nn dongle

Get deviceid for the dongle

sudo lsusb

I get the result...

@kmpm
kmpm / wincommand.md
Created April 16, 2014 06:22
Windows Commands

Search for stuff in windows DHCP server

netsh dhcp server \ourdnsserver scope 192.168.1.0 show clients 1 | findstr raspberrypi

@kmpm
kmpm / helper_apt.sh
Last active August 29, 2015 13:56
vagrant-ubuntu-precise
#!/bin/bash
echo '.. checking apt cache'
timestamp_file="$(mktemp)"
touch -d "$(date -R -d '1 day ago')" $timestamp_file
file=/var/lib/apt/periodic/update-success-stamp
if [ $file -ot $timestamp_file ]; then
echo '.. old apt cache'
apt-get update
apt-get upgrade -y