Skip to content

Instantly share code, notes, and snippets.

@atanasov
atanasov / .vimrc
Created November 29, 2017 10:41 — forked from JeffreyWay/.vimrc
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@atanasov
atanasov / .vimrc
Created November 29, 2017 10:41 — forked from JeffreyWay/.vimrc
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@atanasov
atanasov / gist:a831b0c3ea65bd2702ea
Last active April 22, 2019 13:41
Install PHP development environment on Mac (Homebrew, zsh, composer, php, laravel, vagrant, VirtualBox)
#Install Homebew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
sudo chown -R $(whoami) /usr/local
brew prune
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile
brew update
### Install some apps for Mac with cask
brew install caskroom/cask/brew-cask
@atanasov
atanasov / NumberToWords (Bulgarian)
Last active December 5, 2015 16:21 — forked from wqweto/NumberToWords (Bulgarian)
OpenOffice support
'=====================================================================================================================
'
'
' ОПИСАНИЕ
'
' По подразбиране конвертира левове (в мъжки род), но може да се използва и за мярка в женски род (например метро
' единици) или среден род (например евро).
'
' ИНСТАЛАЦИЯ
'
@atanasov
atanasov / laravel-tricks
Created September 4, 2013 14:34
Laravel undocumented tricks
1- execute raw SQL queries with result
$users = DB::select(DB:raw('SELECT * FROM users'));
then just send users to the view
return View::make('home.index',compact('users'));
@atanasov
atanasov / linux-conf-files
Created August 23, 2013 19:20
linux config files
# vi /etc/resolv.conf - DNS settings
@atanasov
atanasov / useful-linux-commands.txt
Last active December 20, 2015 08:09
Useful linux commands
#WORK WITH ARCHIVES
$ tar xvf archive.tar -> extract the archive to the current folder
$ tar xvfz archive_name.tar.gz -> extract tar.gz or tgz files
$ tar xvfj archive_name.tar.bz2 -> extract tar.bz2 ,tb2, tbz files
$ tar cvf archive.tar folder/ -> create archive from a folder
$ gzip file -> create gz archive from file
$ gzip -d file.gz -> decompress gz archive
@atanasov
atanasov / vhost.sh
Created July 26, 2013 06:16
Simple virtual host creator using same name for directory as server name and writes directly to Apache's httpd.conf e.g. sudo vhost.sh wordpress - create wordpress.dev which points to /home/user/www/wordpress directory
#!/bin/bash
#
#This script adds VirtualHost directly to httpd.conf file
#All you need to do is to change your sites path and your username
#
#Usage : sudo vhost.sh wordpress
#This will generate
# Server Name => wordpress.dev
# Document Root => www/wordpress folder.
if [ "$1" == "" ]; then