Skip to content

Instantly share code, notes, and snippets.

@luisfc
luisfc / Install fish shell Ubuntu.txt
Created April 5, 2017 06:28
Install fish shell Ubuntu
git clone https://github.com/fish-shell/fish-shell
sudo apt-get install fish
#Make Fish your default shell:
chsh -s /usr/bin/fish
#To switch your default shell back, you can run:
chsh -s /bin/bash
@luisfc
luisfc / Enable numlock when ubuntu boot
Last active April 6, 2017 20:08
Enable numlock when ubuntu boot
#Ensure that numlockx is installed:
sudo apt-get install numlockx
#Edit as root user the next file
sudo vi /usr/share/lightdm/lightdm.d/50-ubuntu.conf
or
sudo vi /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
#Add the following line to the end of the file
greeter-setup-script=/usr/bin/numlockx on
@luisfc
luisfc / Install development environment
Last active April 8, 2017 05:12
Install development environment
sudo apt-get install nginx
sudo apt-get install mysql-server
sudo apt-get install php5-cli php5-fpm php5-mysql php5-gd php5-curl php5-sqlite php5-tidy php5-imagick
#For PHP5.6
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install mysql-server
sudo apt-get install php5.6-cli php5.6-fpm php5.6-mysql php5.6-gd php5.6-curl php5.6-sqlite php5.6-tidy php5.6-imagick
#sudo apt-get install php5.6-dom php5.6-json php5.6-common php5.6-opcache php5.6-readline
@luisfc
luisfc / Install wireless drivers Lenovo T430u.txt
Created April 5, 2017 07:09
Installing Broadcom Wireless Drivers Lenovo T430u
lspci -knn | grep Net -A2
sudo apt-get install bcmwl-kernel-source
sudo apt-get install --reinstall bcmwl-kernel-source
@luisfc
luisfc / fix mysql ubuntu
Created April 5, 2017 07:12
fix mysql ubuntu
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe'
sudo apt-get update
sudo apt install mysql-server-5.6 * see note below if you get an error
sudo apt install mysql-client-5.6
####
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe'
sudo apt-get update
sudo apt-get install mysql-server-5.6 mysql-client-5.6
@luisfc
luisfc / selector not y nth-child css
Created April 5, 2017 23:32
selector not y nth-child css
#jQuery
jQuery("thead tr th:not(:nth-child(3n+2))").css("display", "none");
jQuery("tbody tr td:not(:nth-child(3n+2))").css("display", "none");
#css
thead tr th:not(:nth-child(3n+2)),
tbody tr td:not(:nth-child(3n+2)) {
display: none;
}
@luisfc
luisfc / install_drush
Created April 8, 2017 05:09
Install Drush
cd ~
$ wget --quiet -O - http://ftp.drupal.org/files/projects/drush-7.x-5.9.tar.gz
$ tar -zxf drush-7.x-5.9.tar.gz
$ ln -s ~/drush/drush /usr/local/bin/drush
$ drush
@luisfc
luisfc / Change permissions to directories or files
Created April 9, 2017 15:34
Change permissions to directories or files
#Change permissions recursively only to directories:
find . -type d -exec chmod -R 0755 {} \;
#Change permissions recursively only to files:
find . -type f -exec chmod -R 0644 {} \;
@luisfc
luisfc / Install_phpMyAdmin
Created April 10, 2017 04:38
Install phpMyAdmin
sudo apt-get update
sudo apt-get install phpmyadmin php-mbstring php-gettext
@luisfc
luisfc / MYSQL - Copy data table1 to table2
Last active June 5, 2017 20:01
Copy data of one table to another table
INSERT INTO table2 SELECT * FROM table_origin;
INSERT INTO table2 (field1, field2) SELECT table_origin.field1, table_origin.field2 FROM table_origin