This file contains 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 | |
# To capitalize city name. | |
function toCapital | |
{ | |
for x in $* | |
do | |
echo -n ${x:0:1} | tr '[a-z]' '[A-Z]' | xargs echo -n | |
echo -n ${x:1} | tr '[A-Z]' '[a-z]' | xargs echo -n | |
done |
This file contains 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
# Put the script on ~/.bashrc | |
# To use it, type extract <filename> | |
extract () { | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xvjf $1 ;; | |
*.tar.gz) tar xvzf $1 ;; | |
*.tar.xz) tar xvJf $1 ;; | |
*.bz2) bunzip2 $1 ;; |
This file contains 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 | |
echo "Instalador de esenciales" | |
echo "###############################" | |
# Comprueba si ha sido iniciado como SUDO | |
if [ "$EUID" -ne 0 ] | |
then echo "Necesita privilegios de superusuario" | |
exit |
This file contains 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 | |
# Obtiene la fecha del sistema | |
DATE=`date +%Y-%m-%d` | |
# Convierte en una cadena separada por guiones el nombre del archivo | |
NAME=`echo $* | tr " " -` |
This file contains 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 | |
# Version 2.0 | |
# Author: Juanjo Salvador | |
# Website: http://juanjosalvador.github.io/ | |
IFS=' | |
' | |
for i in * ; do |
This file contains 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
/* | |
1. Comprueba que el parámetro ES UN DIRECTORIO (implementado) | |
2. Comprueba que el parámetro NO VA SER SOBREESCRITO (implementado) | |
3. Sustituye los espacios en el nombre del fichero por guiones bajos (_) [OPCIONAL] (no implementado) | |
--- Bash lo necesitaba sin espacios porque es así de quejica --- | |
4. Comprime el directorio en ZIP añadiéndole la extensión CBZ (implementado) | |
*/ |
This file contains 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
<html> | |
<head> | |
<title>AngularJS Hello World!</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> | |
</head> | |
<body> | |
<!-- Controlador --> | |
<script> |
This file contains 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
<html> | |
<head> | |
<title>It works!</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> | |
</head> | |
<body> | |
<!-- Controlador --> | |
<script> |
This file contains 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
config.json | |
reading-image.png |
This file contains 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 | |
# Extrae los subtitulos de los archivos MKV contenidos en la carpeta donde se ejecute el script. | |
# Se puede modificar para extraer cualquier otra pista que no sean los subtítulos. | |
# Nombre de los subtitulos | |
subsName="eng-subs" | |
# Formato de los subtitulos (ass, srt) | |
subsFormat="ass" |