Skip to content

Instantly share code, notes, and snippets.

View sulincix's full-sized avatar
🇹🇷

​​ sulincix

🇹🇷
View GitHub Profile
@sulincix
sulincix / archlinux-convert.sh
Last active April 19, 2022 07:48
replace your existing os with archlinux server
#!/bin/bash
# This script is experimental and may damage your system.
# Please backup files before run this script.
set -e -x
umount -lf /boot/efi || true
mkdir -p /work ; cd /work
wget -c https://gitlab.com/tearch-linux/applications-and-tools/archstrap/-/raw/master/archstrap.sh -O /bin/archstrap
chmod +x /bin/archstrap
apt update
apt install busybox-static zstd -y
@sulincix
sulincix / debian-nosystemd.sh
Last active April 11, 2022 09:38
debian remove systemd
#!/bin/bash
if [[ $UID -ne 0 ]] ; then
echo "You must be root"
exit 1
fi
apt update
# Block service invoke
echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
# Remove systemd preremove script.
@sulincix
sulincix / libadwaita-theming.patch
Created April 7, 2022 23:58
libadwaita theme support
diff --git a/src/adw-style-manager.c b/src/adw-style-manager.c
index ae1a858d..c5b5ac73 100644
--- a/src/adw-style-manager.c
+++ b/src/adw-style-manager.c
@@ -14,6 +14,8 @@
#include "adw-settings-private.h"
#include <gtk/gtk.h>
+int file_exists(const char *fname);
+
@sulincix
sulincix / android.sh
Last active November 14, 2022 15:32
Android Emulatörü
#!/bin/bash
set -e
self=$(realpath $0)
# Creating sdk directory
mkdir -p $HOME/.android-emulator/sdk
cd $HOME/.android-emulator/
# İnstalling java
if [[ ! -d $HOME/.android-emulator/jdk-18 ]] ; then
wget -c https://download.java.net/openjdk/jdk18/ri/openjdk-18+36_linux-x64_bin.tar.gz -O java.tar.gz
tar -xf java.tar.gz
@sulincix
sulincix / build.sh
Last active March 22, 2022 12:35
archlinux vagrant images
### tool-init
set -ex
mkdir -p work
if [[ ! -f /bin/archstrap ]] ; then
wget https://gitlab.com/tearch-linux/applications-and-tools/archstrap/-/raw/master/archstrap.sh -O archstrap
mv archstrap /bin/archstrap
chmod +x /bin/archstrap
fi
### create archlinux chroot
archstrap work/rootfs
@sulincix
sulincix / build.sh
Last active March 27, 2022 21:50
Devuan vagrant imager
#!/bin/bash
set -ex
apt update
apt install qemu-kvm debootstrap grub-pc-bin -yq
mkdir -p work/
[[ ! -f work/rootfs/etc/os-release ]] && debootstrap --variant=minbase --arch amd64 --no-merged-usr --no-check-gpg stable work/rootfs https://pkgmaster.devuan.org/merged
chroot work/rootfs apt install devuan-keyring -yq
### Anti bloat
cat > work/rootfs/etc/apt/apt.conf.d/01norecommend << EOF
APT::Install-Recommends "0";
@sulincix
sulincix / qemu-run.sh
Last active December 8, 2021 13:01
Qemu run virtual machine with virtio
#!/bin/bash
bios="/sys/devices/virtual/dmi/id/"
UUID=$(cat $bios/product_uuid 2>/dev/null)
SERIAL=$(cat $bios/product_serial 2>/dev/null)
DP="none"
if qemu-system-$(uname -m) -display help | grep sdl &>/dev/null ; then
DP="sdl"
elif qemu-system-$(uname -m) -display help | grep gtk &>/dev/null ; then
DP="gtk"
fi
@sulincix
sulincix / wine-install-etap19.sh
Created October 7, 2021 06:28
Install wine to etap19
#!/bin/bash
# Aşağıdaki betiği indirin ve root ile çalıştırın
cd /tmp
dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
apt-key add winehq.key
echo "deb https://dl.winehq.org/wine-builds/debian/ buster main" > /etc/apt/sources.list.d/wine.list
apt update
apt install --install-recommends winehq-stable
#!/bin/bash
# This script revoke usrmerge.
# You must save your unsaved files before run.
# System or applications may crash during process.
# You must reboot after script finished.
# This script is experimental.
set +e
apt-get install busybox-static -yq || exit 1
cp /bin/busybox /busybox
[[ -d /var/lib/dpkg/info/ ]] || exit 1
@sulincix
sulincix / get-latest-stage3.sh
Last active July 1, 2021 04:52
Get latest gentoo stage 3 tarball url
#!/bin/bash
curl https://www.gentoo.org/downloads/ | sed "s/.*href=\"//g" | sed "s/\".*//g" | grep "tar\." | grep -v "systemd" | grep -v "nomultilib" | grep -v "musl" | grep "amd64-" | grep -v "hardened" | sort -V | head -n 1