Skip to content

Instantly share code, notes, and snippets.

View andrewslince's full-sized avatar

Andrews Lince andrewslince

View GitHub Profile
@andrewslince
andrewslince / generate ssl bundle file
Created January 15, 2017 14:30
How to generate a bundle file to configurate SSL certificate.
cat your_domain.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > ssl-bundle.pem
@andrewslince
andrewslince / upgrade-to-php-5.6.sh
Last active August 18, 2016 17:05
Upgrading the PHP v.5.5.x to v.5.6, on Ubuntu 14.04 LTS
sudo apt-get install software-properties-common -y &&
sudo add-apt-repository ppa:ondrej/php5-5.6 &&
sudo apt-get update &&
sudo apt-get install php5 -y
# other installation type: http://stackoverflow.com/a/38086429
@andrewslince
andrewslince / default node modules
Last active June 29, 2016 15:34
Install the commons npm modules (after run "$ &&npm init")
npm install grunt --save-dev && npm install grunt-exec --save-dev && npm install grunt-contrib-watch --save-dev && npm install grunt-contrib-sass --save-dev && npm install grunt-contrib-uglify --save-dev && npm install grunt-contrib-htmlmin --save-dev && npm install grunt-contrib-cssmin --save-dev && npm install load-grunt-tasks --save-dev && npm install grunt-contrib-concat --save-dev && npm install grunt-contrib-jshint --save-dev
@andrewslince
andrewslince / how to configure ssl on development server
Last active July 28, 2017 14:41
Script to configurate a fake ssl virtual host, using Apache Server, on Linux.
#!/bin/bash
##################################################################################################
## ##
## Credits: ##
## - http://www.phpit.com.br/artigos/configurando-ssl-servidor-de-desenvolvimento-apache.phpit ##
## - http://wime.com.br/2013/06/28/como-criar-certificado-ssl-no-apache-para-ubuntu-12-04/ ##
## ##
##################################################################################################
@andrewslince
andrewslince / configure default locale
Last active August 29, 2015 14:13
configure portuguese (brazil) locales
open the terminal e run the commands:
$ sudo locale-gen en_US en_US.UTF-8 pt_BR.UTF-8
$ sudo dpkg-reconfigure locales
credits by: http://mariano.eng.br/erro-cannot-set-lc-all-to-default-locale/
@andrewslince
andrewslince / install casperjs (and phantomjs) on ubuntu
Last active April 23, 2020 08:17
simple tutorial for installing casperjs on ubuntu
# install phantomjs
cd /usr/local/share
sudo wget https://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2
sudo tar xjf phantomjs-1.9.2-linux-x86_64.tar.bz2
sudo ln -s /usr/local/share/phantomjs-1.9.2-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs; sudo ln -s /usr/local/share/phantomjs-1.9.2-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs; sudo ln -s /usr/local/share/phantomjs-1.9.2-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
sudo apt-get install fontconfig
# install casperjs
cd /var/www/
git clone git://github.com/n1k0/casperjs.git
@andrewslince
andrewslince / dropbox install
Created May 21, 2014 16:56
install latest version of dropbox for linux
# install dropbox
cd ~/Downloads/ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
.dropbox-dist/dropboxd
@andrewslince
andrewslince / show the current git branch in linux terminal
Last active August 29, 2015 13:56
With the following code, we can easily get to know the branch in linux terminal. @source: http://saurab.com.np/content/show-current-git-branch-linux-terminal
$ sudo vim ~/.bashrc
# show the current git branch in linux terminal
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;33m\]$(__git_ps1 " [%s]")\[\033[0m\] \[\033[00m\]$ '
$ source ~/.bashrc
#!/bin/bash
sudo apt-get install linux-headers-$(uname -r) linux-image-$(uname -r)
sudo /etc/init.d/vboxdrv setup
@andrewslince
andrewslince / setup linux for web developers
Last active June 6, 2016 13:35
This script installs the softwares: Skype, JDK (Java Development Kit), Google Chrome, Sublime Text 3, Terminator, Git, GitK, PHP5, cURL, PHPUnit, Apache Server, enable mod_rewrite for Apache (For clean url use), MySql Server, PHPMyAdmin, Vim, Gimp, Generates SSH Key (OBS.: replace "<your_email>" by your real e-mail), Oracle Virtualbox
#!/bin/bash
clear
echo "Please enter your e-mail:"
read email
# install google chrome
sudo apt-get install libcurl3 libnspr4-0d libxss1 -y
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*; rm google-chrome*