This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # NOTE: This shit is mixed up (Ubuntu Linux vs Mac OS) | |
| # ###################################### | |
| # Functions and Parameters for Own Aliases | |
| # ###################################### | |
| function parse_git_branch () { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| VHOME=/home/vagrant | |
| sudo apt-get -y install curl wget unzip exuberant-ctags ack tree screen | |
| curl -k https://gist.github.com/jaronson/6892004/raw/37e4872e85e6e2c998971ab2eca8b33e1e917e15/.vimrc -o $VHOME/.vimrc | |
| curl -k https://gist.github.com/jaronson/6892032/raw/63d6b162f3a84396fe9ef7c0da089b8107611af7/.screenrc -o $VHOME/.screenrc | |
| curl -k https://gist.github.com/jaronson/6903803/raw/088e95bcca30ead24bcab4f0561c618842b659e6/debian.profile -o $VHOME/.profile | |
| curl -k https://gist.github.com/jaronson/6903796/raw/ef5f976fcff0ea50e4aa38191cb86a8ee4a1b38d/debian.bash_profile -o $VHOME/.bash_profile | |
| curl -k https://gist.github.com/jaronson/6893402/raw/38751e33b7ab47a9175508a6e0b202d766b6de6e/debian.bashrc -o $VHOME/.bashrc | |
| curl -k https://gist.github.com/jaronson/6903833/raw/afcb3ed0e95b302f2f95b9cabb5743698237ff07/debian.bash_aliases -o $VHOME/.bash_aliases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set up custom bash command prompt. | |
| # Default is "\h:\W \u\$ ". | |
| RED="\[\e[0;31m\]" | |
| GREEN="\[\e[0;32m\]" | |
| BLUE="\[\e[0;34m\]" | |
| PLAIN="\[\e[m\]" | |
| PS1="${RED}\u@\h: \w\$ ${PLAIN}" | |
| # Aliases. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| # All Vagrant configuration is done here. The most common configuration | |
| # options are documented and commented below. For a complete reference, | |
| # please see the online documentation at vagrantup.com. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| vagrantfile-local: | |
| vm: | |
| box: puphpet/ubuntu1404-x64 | |
| box_url: puphpet/ubuntu1404-x64 | |
| hostname: null | |
| memory: '512' | |
| chosen_provider: virtualbox | |
| network: | |
| private_network: 192.168.56.110 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #start | |
| #----------------------------------------------------------------------- | |
| find /srv/backup/daily/databases/ -name '*.gz' -mtime +7 | xargs rm -f; | |
| find /srv/backup/daily/websites/ -name '*.gz' -mtime +7 | xargs rm -f; | |
| # Are Weekly Backups Implemented? | |
| # find /srv/backup/weekly/ -name '*.gz' -mtime +30 | xargs rm -f; | |
| #----------------------------------------------------------------------- | |
| #end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* ---------------------------------------------------------- */ | |
| /* minibots.class.php Ver.1.9g */ | |
| /* ---------------------------------------------------------- */ | |
| /* Mini Bots class is a small php class that allows you to */ | |
| /* use some free web seriveces online to retrive usefull data */ | |
| /* and infos. This version includes: */ | |
| /* smtp validation, check spelling, meteo, exchange rates, */ | |
| /* shorten urls, and geo referencing with IP address and more */ | |
| /* Feel free to use in your applications, but link my blog: */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function random_readable_pwd($length=10){ | |
| // the wordlist from which the password gets generated | |
| // (change them as you like) | |
| $words = 'dog,cat,sheep,sun,sky,red,ball,happy,ice,'; | |
| $words .= 'green,blue,music,movies,radio,green,turbo,'; | |
| $words .= 'mouse,computer,paper,water,fire,storm,chicken,'; | |
| $words .= 'boot,freedom,white,nice,player,small,eyes,'; | |
| $words .= 'path,kid,box,black,flower,ping,pong,smile,'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Необходимо задать три массива: PORTS, PROXY_HOSTS и HOSTS. | |
| # При подключении будут созданы туннели PROXY_HOSTS[id]:PORTS[id] -> HOSTS[id]:3306. | |
| # HOSTS - массив хостов, к которым будет выполнятся ssh подключение (рекомендую использовать ssh-ключи). | |
| PORTS=('33061') | |
| PROXY_HOSTS=('127.0.0.1') | |
| HOSTS=('external.host') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Automatically instal the latest nginx | |
| wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add - | |
| #Make a backup copy of your current sources.list file | |
| sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak | |
| #Now copy the following repositories to the end of ` /etc/apt/sources.list` | |
| echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list | |
| echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list |