This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| platform="$(lsb_release -i -s)" | |
| sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers | |
| case "$platform" in | |
| Debian) | |
| sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=(ALL) NOPASSWD:ALL/g' /etc/sudoers | |
| ;; | |
| Ubuntu) | |
| groupadd -r admin || true | |
| usermod -a -G admin $account |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #usage zshtheme arrow | |
| zshtheme(){ sed -i -e "s/^\(ZSH_THEME=\).*/\1$1/" $HOME/.zshrc } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| url="https://github.com/n0b0dy/gentoo-deploy-tools/archive/master.tar.gz" | |
| gdt_path="$HOME/.gdt" | |
| mkdir -p "$HOME/.gdt/bin" | |
| wget -O - $url | tar -C $gdt_path -xzvf - | |
| mv $gdt_path/gentoo-deploy-tools-master/* $gdt_path | |
| mv $gdt_path/gentoo-deploy-tools-master/.gdt.rc $gdt_path | |
| rmdir $gdt_path/gentoo-deploy-tools-master | |
| source $gdt_path/.gdt.rc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -e | |
| clear | |
| cat <<EOF | |
| ╔╦╗════════╔═╗═════╔╦╗══════╔═╦═╦╦═╗ | |
| ║╩╠═╦═╦═╦╦╗║║╠═╦╦╦╗║║╠═╦═╦╦╗╠═║║║╠═║ | |
| ║╦║╬║╬║╬║║║║║║╩╣║║║╠╗║╩╣╬║╔╝║═╣║║╠═║ | |
| ╚╩╩╩╣╔╣╔╬╗║╚╩╩═╩══╝╚═╩═╩╩╩╝═╚═╩═╩╩═╝ | |
| ════╚╝╚╝╚═╝═════════════════════════ | |
| EOF | |
| sleep 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xinit /usr/bin/fluxbox -- :1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sed -ie "s:\(/home/\).*\(/.fluxbox\):\1n0b0dy\2:g" init |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Gentoo EFI | |
| grub2-install --target=x86_64-efi --modules="part_gpt part_msdos linux normal boot all_video chain efi_gop video video_fb gzio ls lvm" --efi-directory=/boot/efi /dev/sda1 | |
| efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Gentoo" --loader '\EFI\gentoo\grubx64.efi' | |
| ## Ubuntu EFI | |
| grub-install --bootloader-id ubuntu /dev/sda |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| диски | |
| findmnt | |
| lsblk | |
| dmsetup ls --tree | |
| статистика | |
| в dd нажать ctrl+t | |
| в ping нажать ctrl+\ | |
| пакеты debian |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| partclone.ntfs -c -s /dev/sda7 | lzop -3 -c > /media/archive/fs_backup/part.img.lzo | |
| lzop -d win7.pci.lzo -c | partclone.ntfs -r -o /dev/sda7 | |
| #ubuntu efi | |
| sudo efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "Ubuntu 12.04" --loader '\EFI\Ubuntu\grubx64.efi' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HANDY ONE-LINERS FOR RUBY November 16, 2005 | |
| compiled by David P Thomas <davidpthomas@gmail.com> version 1.0 | |
| Latest version of this file can be found at: | |
| http://www.fepus.net/ruby1line.txt | |
| Last Updated: Wed Nov 16 08:35:02 CST 2005 | |
| FILE SPACING: |
OlderNewer