Skip to content

Instantly share code, notes, and snippets.

View artynet's full-sized avatar

Arturo Rinaldi artynet

View GitHub Profile
@paul-ridgway
paul-ridgway / ro-root.sh
Last active June 17, 2024 12:47
A scrip to replace the default RPi init to create and chroot to an overlayfs-backed root
#!/bin/sh
# Read-only Root-FS for Raspian using overlayfs
# Version 1.1:
# Changed to use /proc/mounts rathern than /etc/fstab for deriving the root filesystem.
#
# Version 1:
# Created 2017 by Pascal Suter @ DALCO AG, Switzerland to work on Raspian as custom init script
# (raspbian does not use an initramfs on boot)
#
@artynet
artynet / git-completion.bash
Created March 3, 2018 15:51
bash/zsh completion support for core Git.
#!bash
#
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
@il-katta
il-katta / Dockerfile
Last active January 30, 2022 02:43
script to update katta/openwrt-rootfs docker image
ARG VERSION=latest
FROM docker.io/katta/openwrt-rootfs:$VERSION
RUN mkdir -p /var/lock \
&& mkdir -p /var/run \
&& opkg update \
&& opkg install \
luci \
luci-ssl \
@garyachy
garyachy / Makefile
Created August 27, 2016 15:22
Linux kernel module makefile
ifeq ($(KERNELRELEASE),)
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules EXTRA_CFLAGS="-g -DDEBUG"
modules_install:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
@Juul
Juul / ssh-copy-id-openwrt
Last active August 23, 2023 11:10
ssh-copy-id but for openwrt / dropbear
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "Example: ${0} root@192.168.1.1"
exit 1
fi
cat ~/.ssh/id_rsa.pub | ssh ${1} "cat >> /etc/dropbear/authorized_keys && chmod 0600 /etc/dropbear/authorized_keys && chmod 0700 /etc/dropbear"