Skip to content

Instantly share code, notes, and snippets.

View trukhinyuri's full-sized avatar

YURI TRUKHIN trukhinyuri

View GitHub Profile
@trukhinyuri
trukhinyuri / gist:706f2eae53bcbe819bdd810f6c704f83
Created May 7, 2019 15:11 — forked from shalk/gist:7003628
virsh console with expect
#!/bin/bash
expect -c "
set timeout 10
spawn virsh console cvm1
expect {
\"Escape character\" {send \"\r\r\" ; exp_continue}
\"Escape character\" {send \"\r\r\" ; exp_continue}
\"login:\" {send \"root\r\"; exp_continue}
\"Password:\" {send \"111111\r\";}
@trukhinyuri
trukhinyuri / osx_ramdisk.sh
Created September 28, 2017 20:58 — forked from jnschulze/osx_ramdisk.sh
Move Chrome, Safari and iTunes Cache to Ramdisk.
#!/bin/bash
# Size at the end is * 2048 where 2048 = 1 MB, so 1572864 = 768 MB
#DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://1572864`
DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://2097152`
/usr/sbin/diskutil erasevolume HFS+ "RamDiskCache" $DISK
CACHEDIR="/Volumes/RamDiskCache/$USER"
@trukhinyuri
trukhinyuri / .bashrc
Last active August 29, 2015 14:27 — forked from vsouza/.bashrc
Golang 1.4.1 setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
super+shift+n new window
super+shift+w close window
super+o prompt open file
super+shift+t reopen last file
super+alt+up switch file
super+n new file
super+s save
super+shift+s prompt save as
super+alt+s save all
super+w close