Skip to content

Instantly share code, notes, and snippets.

View alien2003's full-sized avatar
💩

alien2003

💩
View GitHub Profile
@zengxinhui
zengxinhui / convert2arch_arm.sh
Last active March 1, 2025 19:48
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:
@mortie
mortie / auto-screen-rotate.sh
Created November 17, 2018 13:32
Automatically rotate the screen.
#!/bin/sh
# Automatically rotate the screen when the device's orientation changes.
# Use 'xrandr' to get the correct display for the first argument (for example, "eDP-1"),
# and 'xinput' to get the correct input element for your touch screen, if applicable
# (for example, "Wacom HID 486A Finger").
#
# The script depends on the monitor-sensor program from the iio-sensor-proxy package.
if [ -z "$1" ]; then
@mhtsai1010
mhtsai1010 / promiscuous_mode.txt
Created August 29, 2016 02:46
Enable promiscuous mode of vmware on a Linux Host
Ref: https://bbs.archlinux.org/viewtopic.php?id=65508
1/ Method 1
# First, create a new Linux group which has permission to use promiscuous mode, and add yourself to the group.
$ groupadd promiscuous
$ usermod -a -G promiscuous <your_user_id>
# Update the group ownership and access permission of /dev/vmnet*
$ chgrp promiscuous /dev/vmnet*
$ chmod g+rw /dev/vmnet*
@mesonoxian
mesonoxian / zookeeper-kafka
Created May 27, 2015 07:01
Simple Zookeeper and Kafka init.d Startup Script
#! /bin/bash
### BEGIN INIT INFO
# Provides: kafka
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: kafka service
### END INIT INFO