Install GULP dependencies

sudo npm install minimist gulp-autoprefixer browser-sync gulp-changed gulp-concat stream-combiner less chalk gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del –save-dev

VIM Tree configurations

execute pathogen#infect()
syntax on
filetype plugin indent on

cd /var/www/

map <F2> :NERDTreeToggle<CR>
“open Nerd Tree in folder of file in active buffer
” map <Leader>nt :NERDTree %:p:h<CR>

autocmd vimenter * NERDTree
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists(“s:std_in”) | NERDTree | endif

autocmd bufenter * if (winnr(“$”) == 1 && exists(“b:NERDTreeType”) && b:NERDTreeType == “primary”) | q | endif

:set number
:set mouse=a

let g:airline#extensions#tabline#enabled = 1 3

let g:airline#extensions#tabline#fnamemod = ‘:t’

let g:nerdtree_tabs_open_on_console_startup=1

~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
— VISUAL — 1,1 All

Rails validate phone and email

validates_format_of :phone, with: /\A(\d{10}|\(?\d{3}\)?[-. ]\d{3}[-.]\d{4})\z/
validates_format_of :email, with: /\A[\w]([^@\s,;]+)@(([\w-]+\.)+(com|edu|org|net|gov|mil|biz|info))\z/i



wow!!!! thats complicated

validates_format_of :email, :with => /@/


thansk to this blogger : http://davidcel.is/blog/2012/09/06/stop-validating-email-addresses-with-regex/

Vim set indent

1. edit ~/.vimrc file

vi ~/.vimrc

 

2. And add this set of commands to the vimrc file.

set expandtab
set shiftwidth=2
set softtabstop=2
filetype plugin indent on

 

3. Save the changes

:wq!

iptables -I INPUT -p tcp --dport 3000 -j ACCEPT

should do what you want.

 

If you want rules saved so after reboot all will be ok, do:

service iptables save


Note: 
if you want to access without the port (ipaddress:3000) 
run this command

iptables -I INPUT -p tcp --dport 80 -j ACCEPT

then save and reboot:
service iptables save








How to install OTRS on ubuntu 12.04 server

http://ownlinuxnotes.wordpress.com/2012/01/22/install-and-configure-otrs-in-ubuntu/

These are steps i followed today and otrs works fine for me


wget ftp://ftp.otrs.org/pub/otrs/otrs-3.2.9.tar.gz


cp otrs-3.2.9.tar.gz /opt/


cd /opt


tar -xzvf otrs-3.2.9.tar.gz


ln -s /opt/otrs-3.0.3 /opt/otrs


useradd otrs
passwd otrs
usermod -d /opt/otrs otrs


usermod -g www-data otrs


sudo apt-get install mysql-server apache2


cd /opt/otrs


sudo ./bin/otrs.CheckModules.pl | grep Not


sudo aptitude search libdatetime-perl libnet-dns-perl libwp-useragent-determined-perl


sudo aptitude install libdatetime-perl libnet-dns-perl libwp-useragent-determined-perl


sudo bin/otrs.SetPermissions.pl –otrs-user=otrs –otrs-group=otrs –web-user=www-data –web-group=www-data /opt/otrs


sudo ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/sites-available/otrs.conf


sudo ls /etc/apache2/sites-available/


sudo /etc/init.d/apache2 reload


sudo a2ensite otrs.conf


sudo /etc/init.d/apache2 reload


http://local/otrs/installer.pl


It did not work at this moment. Hence, i followed the remaining from http://wiki.otterhub.org/index.php?title=Installation_on_Ubuntu_Lucid_Lynx_ (10.4)


cd /opt/otrs/kernel
cp config.pm.dist config.pm
cp config/genericagent.pm.dist config/genericagent.pm


Modify the ENVVARS file


Add # in front of 


#export Apache_run_user=www-data
#export Apache_run_group=www-data


Below that type :


#export Apache_run_user=otrs
#export Apache_run_group=otrs


Restart Apache and you should be able to complete the registration