Skip to content

Instantly share code, notes, and snippets.

View sulincix's full-sized avatar
🇹🇷

​​ sulincix

🇹🇷
View GitHub Profile

Usb autosuspend disable:

echo -1 > /sys/module/usbcore/parameters/autosuspend

Fix USB cable is bad or device descriptor issue

echo Y | tee /sys/module/usbcore/parameters/old_scheme_first

Wifi power save mode disable

@sulincix
sulincix / init
Last active November 20, 2022 19:44
/sbin/init
#!/bin/bash
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# Simple init script written bash
# You can edit this file
#
#!/bin/bash
#Simple ssh based vpn written pure bash (tested on devuan server and sulin client)
#Usage: sshvpn ip-addres [--init]
#If you dont wanna enable root login, You can run manually way init fuction.
set -ex
ip="$1"
# Remote tunnel device config
if echo "$@" | grep -- "--init" ; then
#You must enable this settings in /etc/ssh/sshd_config file:
#PermitTunnel yes
#!/usr/bin/python3
from pyrogram import Client, filters
import subprocess
import time
import os
bindir=os.getcwd()
# Get hash from here https://my.telegram.org/apps
app = Client("shellbot",api_id=123456,
api_hash="your telegram app hash")
admin_id="1234234"
@sulincix
sulincix / Makefile
Last active June 12, 2021 17:52
Minimal linux live iso creator
#!/usr/bin/make -f
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
KERNEL_VERSION=5.11.6
BUSYBOX_VERSION=1.33.0
@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
#!/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 / 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
@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 / 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";