Skip to content

Instantly share code, notes, and snippets.

View holms's full-sized avatar

Roman Gorodeckij holms

View GitHub Profile
  • Move 720p files to 720p dir
  • Move 1080p files to 1080p dir

Check which track you need to select:

mkvmerge -i myfile.mkv | grep audio

You'll get something like this:

@holms
holms / nullify_logs
Created March 9, 2014 20:32
Nullify all files in current dir
for logs in *; do cat /dev/null > $logs; done
@holms
holms / OSX-vpn.md
Last active March 26, 2018 18:24
Working Debian PPTP VPN for OSX client

PPTP VPN Server setup on Debian, for OSX/iOS clients.

sudo aptitude install pptpd 

sudo cat > /etc/pptpd.conf << EOF
localip 192.168.240.1
remoteip 192.168.240.2-9
EOF
@holms
holms / gist:8845190
Last active August 29, 2015 13:56
Scp alternative with Rsync
rsync -av --human-readable --progress --inplace --rsh='ssh' user@domain.com:/home/user .
# if you have whitespaces that's only variants which worked for me, with variables and protect-args param
rsync -av --human-readable --progress --inplace --protect-args "$localpath/" --rsh='ssh' home:"$remotepath/"
@holms
holms / batch-mkvmerge.sh
Created January 16, 2014 00:03
Batch mkvmerge
ls *.mkv | while read i; do mkvmerge -o "converted/${i}" "${i}" "${i%mkv}mka" ; done
@holms
holms / virt-manager-osx
Last active January 31, 2019 23:38
Install virt-manager osx
git clone git://git.fedorahosted.org/virt-manager.git
cd virt-manager
sudo port -v install intltool py27-pygtk
sudo python setup.py install
@holms
holms / gist:7768455
Created December 3, 2013 12:32
Xorg: fast keyboard, fast rate
sudo xset r rate 100 80
@holms
holms / mbr2gpt.md
Last active March 20, 2022 16:39
Create GPT partition table and Create logical volumes

Create GPT partition table

Sorry but you HAVE to go with rescue disk.

parted /dev/sdb
(parted) mklabel gpt
(parted) mkpart primary 0GB 100%
(parted) print
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl libssl-dev \
libreadline5 libreadline5-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libxslt-dev libxml2-dev
@holms
holms / install-metasploit-osx.md
Last active August 19, 2023 19:12
Install Metasploit with Armitage on OSX Maverics