Skip to content

Instantly share code, notes, and snippets.

Jerry Anselmi ElMijo

Block or report user

Report or block ElMijo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ElMijo
ElMijo / reset-etc-permissions.sh
Created Jun 29, 2017
Comando para restablecer los permisos de la carpeta /etc, en caso que no podamos hacer sudo su por que el dueño de /etc/sudoers sea distinto a root
View reset-etc-permissions.sh
#! /bin/bash
pkexec chown -R root:root /etc
pkexec find /etc -type f -exec chmod 644 {} +
pkexec find /etc -type d -exec chmod 755 {} +
pkexec chmod 755 /etc/init.d/* /etc/rc.local /etc/network/* /etc/cron.*/*
pkexec chmod 400 /etc/ssh/ssh*key
View ubuntu-install-database.sh
#! /bin/bash
echo "configuring.."
sudo echo mysql-server mysql-server/root_password select 123456 | debconf-set-selections
sudo echo mysql-server mysql-server/root_password_again select 123456 | debconf-set-selections
echo "installing..."
sudo apt-get install postgresql postgresql-client pgadmin3 mysql-server mysql-client mysql-workbench -y
sudo -u postgres psql -U postgres -d postgres -c "alter user postgres password '123456';"
sudo updatedb
sudo sed -i '85s/peer/md5/' $(locate --regexp=pg_hba.conf$ --limit=1)
sudo sed -i '90s/peer/md5/' $(locate --regexp=pg_hba.conf$ --limit=1)
View ubuntu-install-firefox-dev.sh
#! /bin/bash
OS=$(getconf LONG_BIT)
LANG=$(echo $LANGUAGE | sed -e 's/_/-/g')
FIREFOX_DEV_URL="https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux$OS&lang=$LANG"
FIREFOX_DESKTOP="[Desktop Entry]\nName=Firefox Developer\nGenericName=Firefox Developer Edition\nExec=/opt/firefox_dev/firefox\nTerminal=false\nIcon=/opt/firefox_dev/browser/icons/mozicon128.png\nType=Application\nCategories=Application;Network;X-Developer;\nComment=Firefox Developer Edition Web Browser."
echo "Download Firefox Dev..."
wget --quiet --output-document="firefox_dev.tar.bz2" $FIREFOX_DEV_URL
echo "Extracting and install Firefox Dev..."
tar -jxvf firefox_dev.tar.bz2
sudo rm firefox_dev.tar.bz2
@ElMijo
ElMijo / ubuntu-install-php5.6.sh
Last active May 18, 2017
This script allows us to install version 5.6 of php + composer
View ubuntu-install-php5.6.sh
#! /bin/bash
sudo apt-get install software-properties-common curl git apache2 mcrypt -y
sudo a2enmod headers rewrite
sudo service apache2 restart
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update
sudo apt-get install php5.6 php5.6-curl php5.6-gd php5.6-imagick php5.6-intl php5.6-mcrypt php5.6-mysql php5.6-odbc php5.6-pgsql php5.6-xsl php5.6-xmlrpc php5.6-soap php-pear php5.6-cli php5.6-xml php5.6-xdebug
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
@ElMijo
ElMijo / install-wps.sh
Last active Jun 27, 2017
This is a simple way to install the WPS Office package
View install-wps.sh
#! /bin/bash
WPS_PACKAGE=a21/wps-office_10.1.0.5707~a21_amd64.deb
WPS_FONTS_PACKAGE=wps-office-fonts_1.0_all.deb
curl --show-error --silent --output "wps.deb" http://kdl.cc.ksosoft.com/wps-community/download/$WPS_PACKAGE
sudo dpkg -i wps.deb
sudo rm wps.deb
curl --show-error --silent --output "wps-fonts.deb" http://kdl.cc.ksosoft.com/wps-community/download/fonts/$WPS_FONTS_PACKAGE
sudo dpkg -i wps-fonts.deb
@ElMijo
ElMijo / ubuntu-install-atom.sh
Last active Mar 8, 2017
Este es un instalador de atom que se trae un conjunto de packages ideales para desarrolladores web
View ubuntu-install-atom.sh
#! /bin/bash
echo "Download Atom..."
wget --quiet --output-document="atom.deb" https://atom.io/download/deb
echo "Install Atom..."
sudo dpkg -i atom.deb
sudo rm atom.deb
echo "Install Atom's Packages..."
apm install atom-beautify atom-beautify minimap color-picker emmet file-icons project-manager docblockr atom-material-ui atom-material-syntax atom-material-syntax-light markdown-writer
@ElMijo
ElMijo / elementary-os-postinstall.sh
Last active Dec 13, 2015
Este es un archivo sh que permite instalar algunas aplicaciones necesarias para el disfrutar plenamente de Elementary OS. esto esta probado en Freya en pc y laptop.
View elementary-os-postinstall.sh
#! /bin/sh
# actualizar el sistema operativo
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y
# Instalar Soporte para formatos de archivos Extra
sudo apt-get install unace rar unrar p7zip-rar p7zip zip unzip sharutils uudeview mpack lha arj cabextract file-roller -y
# programas adiccionales varios
sudo apt-get install gparted soundconverter puddletag gimp synaptic firefox -y
@ElMijo
ElMijo / iniciaProyectoGit.sh
Last active Aug 29, 2015
Comando que permite iniciar un repositorio remoto en tu local
View iniciaProyectoGit.sh
#!/bin/bash
argumentsToVar(){
for var in "$@"
do
varname=`echo "$var"|cut -d'=' -f 1 | cut -c 3-`
varname=${varname//-/}
eval ${varname}=`echo "$var"|cut -d'=' -f 2`
done
}
@ElMijo
ElMijo / argumentsToVar
Created Jul 12, 2014
Función bash que permite convertir los parametros de pasados a un script en variables ( bash script function to convert arguments to variables )
View argumentsToVar
argumentsToVar(){
for var in "$@"
do
varname=`echo "$var"|cut -d'=' -f 1 | cut -c 3-`
varname=${varname//-/}
eval ${varname}=`echo "$var"|cut -d'=' -f 2`
done
}
@ElMijo
ElMijo / convertFlacToMp3.sh
Created Apr 15, 2014
Una forma facil de convertir los archivos de FLAC en MP3 (OJO!!.. solo por que los reproductores de automoviles no soportan este formato)
View convertFlacToMp3.sh
#!/bin/bash
# Este es el comando para la instalacion de los paquetes necesarios
# > sudo apt-get install flac lame
# Si quieres verificar la instalacion de los paquetes ejeuta los siguientes comandos
#
# > sudo dpkg -l | grep lame
# Resultado:
#
You can’t perform that action at this time.