Skip to content

Instantly share code, notes, and snippets.

View docker-machine.zsh
dm(){
case $1 in
use)
if [ -n "$2" ]
then
eval "$(docker-machine env $2)"
else
echo "Host does not empty"
fi
;;
@n0b0dy
n0b0dy / gist:08584cae45685360ba8b
Created Oct 19, 2015
Disable Sketch 3 auto-save
View gist:08584cae45685360ba8b
defaults write com.bohemiancoding.sketch3 ApplePersistence -bool no
View gist:7293658
#!/bin/bash
# ./encrypt.sh -keys public.pem private.pem
# ./encrypt.sh folder public.pem > decrypt-folder.sh
# chmod +x decrypt-folder.sh
# ./decrypt-folder.sh private.pem > folder.tar
#
#
# $ ./encrypt.sh
# Usage: ./encrypt-file.sh [directory] [public-key] > [decryption-script]
View sshkeeper
#!/bin/sh
#sshkeper 0.1 stub
stubid='11e147c678fd44fada054745e31d7492'
enc='openssl enc -e -base64 -aes-256-cfb'
dec='openssl enc -d -base64 -aes-256-cfb'
compression='z' #
prefix="$HOME/.ssh"
self="$0"
selfpkg(){
View ruby-1-liners.txt
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:
View snippet
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'
@n0b0dy
n0b0dy / lincmd
Last active Dec 15, 2015
Список команд которые иногда могу забыть но они нужны.
View lincmd
диски
findmnt
lsblk
dmsetup ls --tree
статистика
в dd нажать ctrl+t
в ping нажать ctrl+\
пакеты debian
@n0b0dy
n0b0dy / gist:4965100
Last active Dec 13, 2015
Gentoo & Ubuntu grub2-efi
View gist:4965100
## 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
@n0b0dy
n0b0dy / gist:4756775
Created Feb 11, 2013
меняет $HOME в конфиге fluxbox
View gist:4756775
sed -ie "s:\(/home/\).*\(/.fluxbox\):\1n0b0dy\2:g" init
@n0b0dy
n0b0dy / gist:4751675
Created Feb 11, 2013
запуск дополнительной X сессии
View gist:4751675
xinit /usr/bin/fluxbox -- :1