Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

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 October 19, 2015 21:10
Disable Sketch 3 auto-save
defaults write com.bohemiancoding.sketch3 ApplePersistence -bool no
#!/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]
#!/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(){
@n0b0dy
n0b0dy / ruby-1-liners.txt
Created May 21, 2013 21:39
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:
@n0b0dy
n0b0dy / snippet
Created March 22, 2013 11:52
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 December 15, 2015 03:49
Список команд которые иногда могу забыть но они нужны.
диски
findmnt
lsblk
dmsetup ls --tree
статистика
в dd нажать ctrl+t
в ping нажать ctrl+\
пакеты debian
@n0b0dy
n0b0dy / gist:4965100
Last active December 13, 2015 19:48
Gentoo & Ubuntu grub2-efi
## 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 February 11, 2013 19:13
меняет $HOME в конфиге fluxbox
sed -ie "s:\(/home/\).*\(/.fluxbox\):\1n0b0dy\2:g" init
@n0b0dy
n0b0dy / gist:4751675
Created February 11, 2013 00:25
запуск дополнительной X сессии
xinit /usr/bin/fluxbox -- :1