Skip to content

Instantly share code, notes, and snippets.

View artembeloglazov's full-sized avatar
🚴

Artem Beloglazov artembeloglazov

🚴
View GitHub Profile
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="tjkirch"
# Example aliases
mysqldump MYSQL_DUMP_OPTIONS | gzip > outputfile_`date +%d_%m_%Y`.sql.gz
mysqldump MYSQL_DUMP_OPTIONS | gzip > outputfile_`date +%d_%m_%Y`.sql.gz
gunzip < outputfile.sql.gz | mysql < mysql options>
==> Caveats
If this is your first install, automatically load on login with:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/mongodb/2.2.0-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
If this is an upgrade and you already have the homebrew.mxcl.mongodb.plist loaded:
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
cp /usr/local/Cellar/mongodb/2.2.0-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
if [ -d ~/.oh-my-zsh ]
then
echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove ~/.oh-my-zsh if you want to install"
exit
fi
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
curl https://gist.github.com/artembeloglazov/4706372/raw/.zshrc > ~/.zshrc
chsh -s `which zsh`
echo 'Надо перегрузить консоль.'
@artembeloglazov
artembeloglazov / install.sh
Last active February 15, 2017 17:33
Установка Webmin
sudo sh -c 'echo "deb http://download.webmin.com/download/repository sarge contrib \ndeb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list'
sudo curl -o /tmp/webmin.key http://www.webmin.com/jcameron-key.asc
sudo apt-key add /tmp/webmin.key
sudo apt-get update
sudo apt-get -y install webmin
@artembeloglazov
artembeloglazov / qemu-ifdown
Last active August 4, 2020 07:32 — forked from EmbeddedAndroid/qemu-ifup
Mac OSX (10.8.X) scripts for QEMU/KVM bridged networking with nat on en1.
#!/bin/bash
echo "Executing /etc/qemu-ifdown"
echo "Bringing TAP interface down"
ifconfig $1 down
echo "Removing interfaces"
ifconfig bridge0 deletem en1 deletem $1
echo "Bring down bridge"
ifconfig bridge0 down
echo "Removing bridge"
ifconfig bridge0 destroy
@artembeloglazov
artembeloglazov / Список svn-репозитариев по папкам
Last active August 29, 2015 14:18
gist created by github.com/dscape/ghcopy
svn info ./* | grep -E "Path|URL"
@artembeloglazov
artembeloglazov / ghcopy.txt
Last active November 6, 2015 16:20
SSH-туннель
ssh -L ПОРТ_ДЛЯ_ЛОКАЛЬНОГО_ОБРАЩЕНИЯ:УДАЛЕННЫЙ_ХОСТ:УДАЛЕННЫЙ_ПОРТ user@host
@artembeloglazov
artembeloglazov / gist:3e06aacadbb5de21627e
Created May 7, 2015 08:42
Запуск ccleaner'a с админским доступом
sudo /Applications/CCleaner.app/Contents/MacOS/CCleaner