Skip to content

Instantly share code, notes, and snippets.

View leicht-io's full-sized avatar

Christian Leicht leicht-io

View GitHub Profile
# Update Raspbian
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-update
sudo rpi-update
# Remove games and more
sudo apt-get purge --auto-remove scratch debian-reference-en dillo idle3 python3-tk idle python-pygame python-tk lightdm gnome-themes-standard gnome-icon-theme raspberrypi-artwork gvfs-backends gvfs-fuse desktop-base lxpolkit netsurf-gtk zenity xdg-utils mupdf gtk2-engines alsa-utils lxde lxtask menu-xdg gksu midori xserver-xorg xinit xserver-xorg-video-fbdev libraspberrypi-dev libraspberrypi-doc dbus-x11 libx11-6 libx11-data libx11-xcb1 x11-common x11-utils lxde-icon-theme gconf-service gconf2-common python-rpi.gpio geany geany-common *pygame thonny qpdfview mousepad leafpad galculator xarchiver lxtask vi gpicview piclone rp-prefapps dillo
sudo apt-get --yes autoclean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-update
sudo rpi-update
@leicht-io
leicht-io / arch_linux_arm_setup.sh
Last active December 29, 2019 19:50
ArchLinuxArm Setup
# https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4
pacman-key --init
pacman-key --populate archlinuxarm
# https://raspberrypi.stackexchange.com/questions/7987/wifi-configuration-on-arch-linux-arm
pacman -Syu && pacman -S netctl && pacman -S vim && pacman -S sudo
pacman -R vi && pacman -R nano
@leicht-io
leicht-io / gist:7641ff0c1052aac9f31b0db29485f6a0
Last active December 28, 2019 19:22
Chromium Kiosk for Raspberry Pi
chromium --disable-sync-preferences --disk-cache-dir=/tmp/cache --process-per-site
@leicht-io
leicht-io / gist:18c84447d19b8423351209e469bc2432
Created December 28, 2019 13:40
Post Raspbian Lite Install
sudo apt-get update
sudo apt-get upgrade
sudo rpi-upgrade
sudo apt-get autoremove -y
@leicht-io
leicht-io / Vector.ts
Last active October 17, 2019 07:21
Typescript class for manipulating vectors in 2D and 3D
export class Vector {
public x;
public y;
public z;
constructor(x: number, y: number, z?: number) {
this.x = x || 0;
this.y = y || 0;
this.z = z || 0;
}
/**
* Created by Christian Leicht Jørgensen on 11-04-2016. <br />
* Visit <a href="https://leicht-thruesen.com">Leicht & Thruesen</a> for more information. <br /> <br />
* <p>
* Based on HTTP/1.1 specifications for RFC 7231.<br />
*
* @see <a href="https://tools.ietf.org/html/rfc7231">IETF RFC 7231</a>
*/
public class HttpStatus {
@Echo off
set /p device_ip=Enter local device IP:
IF "%ANDROID_SDK_PATH%" == "" (
ECHO SDK PATH IS NOT DEFINED
) else (
SET sdk_path = "%ANDROID_SDK_PATH%\platform-tools"
cd /D %ANDROID_SDK_PATH%\platform-tools
#!/bin/bash
#This will lead to the script stopping when the first command fails.
set -eux
# Cassandra snapshot to S3
# author: clj@leicht-thruesen.com
# date: 19.01.2016
# updated: 21.01.2016