Skip to content

Instantly share code, notes, and snippets.

@amishmm
amishmm / ArchOracleCloud.md
Last active November 24, 2025 03:06
Install Arch Linux on Oracle Cloud (Free Tier)

Requirement

  • Console / Cloud Shell access (via https://cloud.oracle.com)
  • Go to the instance page and under Resources -> Console connection -> Launch Cloud Shell connection

Steps

  1. In Ubuntu OR any other Free tier Linux OS
# Download Alpine Linux and install it on disk
cd /
wget https://dl-cdn.alpinelinux.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.2-x86_64.iso
@Tosainu
Tosainu / gpio_chdev_v2.c
Created April 26, 2022 09:53
GPIO chdev v2 memo
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <unistd.h>
#include <linux/gpio.h>
@zengxinhui
zengxinhui / convert2arch_arm.sh
Last active September 10, 2025 11:18
Replace Oracle Cloud Linux with Arch Linux ARM remotely
[02/25/2025]
Refs:
1. http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
2. https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/aarch64/alpine-virt-3.21.3-aarch64.iso
3. https://wiki.alpinelinux.org/wiki/Replacing_non-Alpine_Linux_with_Alpine_remotely
4. https://wiki.archlinux.org/index.php/installation_guide#Configure_the_system
5. https://archlinuxarm.org/platforms/armv8/generic
See also:
@ericwoud
ericwoud / Hostapd - One vlan per interface or bss and use of environment variables.md
Last active December 29, 2020 12:26
Hostapd - One vlan per interface or bss and use of environment variables.

Hostapd - One vlan per interface or bss and use of environment variables.

Instead of using dynamic vlan and radius, there is another way of implementing vlan with hostapd.

It is possible to set up one vlan per interface and one vlan per bss. The interfaces and bsses need to be added to a vlan aware bridge. The only problem is to keep WPA-PSK functional,

@ericwoud
ericwoud / ssh-fix-reboot.service
Last active August 31, 2023 15:36
Improved Secure Shell session cleanup. It delays shutdown until all sessions are closed.
[Unit]
Description=Secure Shell session cleanup V2
Wants=network-online.target
After=network.target network-online.target hostapd.service
[Service]
SyslogIdentifier=ssh-fix-reboot
RemainAfterExit=yes
Type=oneshot
TimeoutSec=10
@pfeerick
pfeerick / pine64-i2c-MCP23017-toggleLeds.sh
Last active May 3, 2024 10:48
Shell script to toggle LEDs on a MCP23017 I2C I/O expander connected to a pine64 board
#!/bin/bash
#elevate to root to ensure no permission errors
#[ `whoami` = root ] || exec su -c $0 root
if [[ $EUID -ne 0 ]]; then
echo "i2cset usually needs sudo powers to run, please login if prompted to avoid permission errors"
exec sudo $0
fi
echo "Set all Port A pins (GPA0-7) as outputs..."