Skip to content

Instantly share code, notes, and snippets.

View SeppPenner's full-sized avatar
😜
I like cookies 🍪🍪🍪🍪

SeppPenner SeppPenner

😜
I like cookies 🍪🍪🍪🍪
View GitHub Profile
@SeppPenner
SeppPenner / gist:4b3f7d8f6cb05091bae2de5821499fad
Created May 7, 2018 15:46 — forked from oysteinjakobsen/gist:e59cdd38a688ee8a418a
How to get docker-compose (fig) up and running on Raspberry Pi 2

Background

I assume you already have Docker up and running on your Raspberry Pi 2. If not, see this article.

The next natural step is to install Docker Compose (formerly Fig), but there's no ARM support out of the box. This recipe will help you install Docker Compose on your Raspberry Pi 2!

The following six steps will do the trick:

  1. Get the docker-compose source code from git
@SeppPenner
SeppPenner / gist:0cadb187b7f49c5743b3edd855092964
Created May 10, 2018 16:27 — forked from pazdera/gist:1121315
Brute-force string generation in Python (optimized for printable characters only)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Brute-force string generation
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@SeppPenner
SeppPenner / Dockerfile
Last active April 9, 2021 10:05
Dockerfile for VerneMQ setup on Raspberry Pi including bridging to another broker
FROM armhf/debian:jessie
RUN apt-get update && apt-get install -y \
libssl-dev \
logrotate \
sudo \
curl \
jq \
&& rm -rf /var/lib/apt/lists/*
@SeppPenner
SeppPenner / Installing Python 3.7.4 on Raspbian.rst
Last active May 9, 2024 21:52
Installing Python 3.7.4 on Raspbian

Installing Python 3.7.4 on Raspbian

As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.4. This means we will have to build it ourselves, and here is how to do it.

  1. Install the required build-tools (some might already be installed on your system).
# to remove old version:
sudo dpkg -r grafana grafana-data
sudo apt-get -y autoremove
sudo rm -rf /etc/grafana /var/lib/grafana /var/log/grafana /etc/rc5.d/S02grafana /etc/rc6.d/K01grafana /etc/rc3.d/S02grafana /etc/rc2.d/S02grafana /etc/rc4.d/S02grafana /etc/rc1.d/K01grafana /etc/default/grafana /etc/init.d/grafana /etc/rc0.d/K01grafana /usr/lib/systemd/system/grafana-server.service /etc/systemd/system/grafana-server.service /etc/systemd/system/grafana.service /etc/systemd/system/multi-user.target.wants/grafana.service /etc/apt/sources.list.d/grafana.list /etc/default/grafana-server /etc/init.d/grafana-server /var/lib/systemd/deb-systemd-helper-enabled/grafana-server.service /var/lib/systemd/deb-systemd-helper-enabled/grafana.service.dsh-also /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/grafana.service /var/lib/systemd/deb-systemd-helper-masked/grafana.service /home/pi/grafana_2.6.0+dfsg-3_armhf.deb /home/pi/grafana-data_2.6.0+dfsg-3_all.deb
# to install latest:
curl https://bintray.
@SeppPenner
SeppPenner / gist:d3ee97bc785d091d51efe49ab5fe0684
Created September 26, 2018 11:25
Install Grafana on a Raspberry Pi 3
https://grafana.com/grafana/download/5.3.0-beta1?platform=arm
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.3.0-beta1_armhf.deb
sudo dpkg -i grafana_5.3.0-beta1_armhf.deb
@SeppPenner
SeppPenner / Readme.md
Last active October 10, 2019 14:28
Python upgrade Pip packages

For pip < 10.0.1:

import pip
from subprocess import call

packages = [dist.project_name for dist in pip.get_installed_distributions()]
for package in packages:
	try:
 call("pip install --upgrade " + package, shell=True)
@SeppPenner
SeppPenner / setup.sh
Last active November 11, 2018 17:28
Setting up .NET Core on a Raspberry Pi
sudo apt-get install curl libunwind8 gettext
curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-linux-arm.tar.gz
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
dotnet --help
rm -rf dotnet.tar.gz
@SteveH3032
SteveH3032 / ps-download-all-nuget-packages
Last active September 12, 2019 13:32
Nov 2018 - PowerShell script to download all NuGet packages
$indexClient = new-object system.net.webclient
$jsonIndex=$indexClient.DownloadString("https://api.nuget.org/v3/catalog0/index.json") | ConvertFrom-Json
for ($h=0; $h -lt $jsonIndex.items.Length; $h++) {
$web_client = new-object system.net.webclient
$jsonObj=$web_client.DownloadString($jsonIndex.items[$h].'@id') | ConvertFrom-Json
for ($i=0; $i -lt $jsonObj.items.Length; $i++) {
$package = $jsonObj.items[$i]."nuget:id" + "/" + $jsonObj.items[$i]."nuget:version"
$web_client.DownloadFile("https://www.nuget.org/api/v2/package/" + $package, ("C:\Nuget\" + $jsonObj.items[$i]."nuget:id" + "." + $jsonObj.items[$i]."nuget:version" + ".nupkg"))
"Processing: " + ($h + 1) + " of " + $jsonIndex.count + " ---- " + ($i + 1) + " of " + $jsonObj.count + " - " + $jsonObj.items[$i]."nuget:id" + "." + $jsonObj.items[$i]."nuget:version"
}
@lukas-h
lukas-h / license-badges.md
Last active May 10, 2024 01:14
Lizenz-Buttons für dein Projekt

Markdown Lizenz-Buttons

Sammlung von Lizenz-Schildern (Badges) für die README-Datei deines Projekts. Diese Liste enthält die meist verbreiteten Open Source und Open Data Lizenzen. Kopieren und fügen Sie den Code unter den Badges einfach in Ihre Markdown-Dateien ein.

Notes