Skip to content

Instantly share code, notes, and snippets.

View madanadam's full-sized avatar

Mehmet Akif madanadam

View GitHub Profile
#cloud-config
autoinstall:
version: 1
early-commands:
# delete any old partition data, up to 240MB size, if this was reinstall
# erases partition tables and whole boot partition as well, by erasing 30x8MB=240MB (partition is 200MB)
- dd if=/dev/zero of=/dev/sda bs=8M count=30
# create new 200MB boot partition and rest as root partition
- (echo o; echo n; echo p; echo 1; echo ""; echo +200M; echo n; echo p; echo 2; echo ''; echo ''; echo a; echo 1; echo p; echo w) | fdisk /dev/sda
VBoxManage clonehd absolutepath/image.vdi image.img --format raw
/usr/local/bin/translate
#!/usr/bin/env bash
echo "$(xsel -o | trans -b -no-ansi -u firefox -t tr)" | yad --title="Google Çeviri" --width=500 --height=450 --center --text-info --wrap
/root/.jwm/jwmrc-personal
<Group><Name>chromium</Name><Option>notitle</Option></Group>
Extract
zcat /boot/initrd-$(uname -r).img | cpio -idmv
Compress
find . | cpio -o -c -R root:root | gzip -9 > /boot/new.img
@madanadam
madanadam / android-backup-apk-and-datas.md
Created March 11, 2023 12:31 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

Fetch application APK

@madanadam
madanadam / .conkyrc
Created October 14, 2022 12:01
Conky + Pil
conky.config = {
use_xft = true,
xftalpha = 0.8,
update_interval = 5.0,
total_run_times = 0,
own_window = true,
own_window_transparent = true,
own_window_argb_visual = true,
own_window_type = 'desktop',
own_window_class = 'conky-semi',
@madanadam
madanadam / void_linux_snippets
Last active June 10, 2022 14:24
Void Linux Snippets
HEDEF=/mnt
mount /dev/sda4 $HEDEF
cd $HEDEF
wget -c https://repo-default.voidlinux.org/live/current/void-x86_64-musl-ROOTFS-20210930.tar.xz
tar xvf void-x86_64-musl-ROOTFS-20210930.tar.xz -C $HEDEF
wget -c https://repo-default.voidlinux.org/live/current/void-x86_64-ROOTFS-20210930.tar.xz
@madanadam
madanadam / gist:8aa9c1e4439accab03796f3e2513f62f
Created January 20, 2022 07:52 — forked from francesco-carrella/gist:9916979
Ubuntu - Fix splash screen with proprietary drivers
This is soultion how to fix no splash screen in Ubuntu after nvidia proprietary driver installation. It's no matter what Ubuntu version you use, it should work anyway.
Open your terminal and type
sudo apt-get install v86d
Then
sudo gedit /etc/default/grub
Find this line
@madanadam
madanadam / n410
Created September 20, 2021 12:00
N410 Boot to Linux
EFI\Microsoft\Boot\bootmgfw.efi rename to EFI\Microsoft\Boot\bootmgfw10.efi
custom.cfg
menuentry 'Windows Boot Manager (on /dev/mmcblk1p1)' {
insmod part_gpt
insmod fat
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root B2A3-BBDC
adb shell settings put system accelerometer_rotation 0 #disable auto-rotate
adb shell settings put system user_rotation 3 #270° clockwise
accelerometer_rotation: auto-rotation, 0 disable, 1 enable
user_rotation: actual rotation, clockwise, 0 0°, 1 90°, 2 180°, 3 270°
wm help
set-user-rotation [free|lock] [-d DISPLAY_ID] [rotation]
Set user rotation mode and user rotation.
wm set-user-rotation lock 0