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 | |
##This can be on /bin/ or /usr/bin or any site of your $PATH | |
####Based on https://gist.github.com/guerrerocarlos/3977495 | |
if [[ ! -n "$1" ]];then | |
echo "Archivo no ingresado" | |
exit | |
fi |
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 | |
#Convierte a mayúsculas todos los parámetros que recibe | |
echo $@ | awk '{print toupper($0)}' |
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 | |
#Convierte a minúsculas todos los parámetros que recibe | |
echo $@ | awk '{print tolower($0)}' |
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 | |
if [[ ! -n "$1" ]]; | |
then | |
echo "Nombre de archivo no ingresado" | |
exit | |
fi | |
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 $@ | sed $"s/./&\xCC\xB6/g" |
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
#SomeTimes i delete lnk files on USB drives from my friends, | |
# i got to directory on /media/USB_DRIVE_NAME and apply next alias | |
alias deletelnk='sudo find . -iname "*lnk" -exec rm {} \;' | |
#Using woodim for put blank a cdrom r+w | |
alias deleteCD='wodim -v dev=/dev/sr0 blank=fast' | |
#Using woodim for put blank a Dvd r+w | |
alias deleteDVD='dvd+rw-format -blank=full /dev/sr0' | |
#Alias for connect to Windows host on one domain via rdesktop, | |
# require a ip as parameter, e.g.remote 192.168.0.1 | |
alias remote='rdesktop -g 70% -u username -d domanin -a 16' |
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/sh | |
####################################################### | |
# UNIX TREE # | |
# Version: 2.3 # | |
# File: ~/apps/tree/tree.sh # | |
# # | |
# Displays Structure of Directory Hierarchy # | |
# ------------------------------------------------- # | |
# This tiny script uses "ls", "grep", and "sed" # | |
# in a single command to show the nesting of # |
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 | |
# simple function to check http response code before downloading a remote file | |
# example usage: | |
# if `validate_url $url >/dev/null`; then dosomething; else echo "does not exist"; fi | |
function validate_url(){ |
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
<?php | |
//original code written by @willicab > https://pastebin.mozilla.org/6456892 | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
$mes = array( | |
"ENERO" => "01", | |
"FEBRERO" => "02", | |
"MARZO" => "03", | |
"ABRIL" => "04", |
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 | |
# This script was created from source of -> http://serverfault.com/questions/62316/how-do-i-list-loaded-linux-module-parameter-values | |
#This code list parameters of each loaded kernel modules | |
cat /proc/modules | cut -f 1 -d " " | while read module; do \ | |
echo "Module: $module"; \ | |
if [ -d "/sys/module/$module/parameters" ]; then \ | |
ls /sys/module/$module/parameters/ | while read parameter; do \ | |
echo -n "Parameter: $parameter --> "; \ | |
cat /sys/module/$module/parameters/$parameter; \ |
OlderNewer