This file contains hidden or 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
# Soporte para 256 colores. | |
set -g default-terminal "screen-256color" | |
# Soporte para Ctrl arrows | |
set-window-option -g xterm-keys on | |
# Cambiar PREFIX a Ctrl + a | |
set-option -g prefix C-a | |
unbind-key C-b | |
bind-key C-a send-prefix |
This file contains hidden or 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 | |
wget https://raw.githubusercontent.com/PHPMailer/PHPMailer/master/class.phpmailer.php | |
find /home/*/public_html -name "class-phpmailer.php" > class-phpmailer.php.list | |
cat class-phpmailer.php.list | while read line; do | |
echo "cp -f class.phpmailer.php $line" | |
cp -f class.phpmailer.php "$line" | |
done |
This file contains hidden or 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 | |
# Prefijo de las ramas a eliminar | |
PREFIX="APT" | |
# Sincroniza | |
git fetch origin --prune | |
# Limpia localmente | |
git branch|grep $PREFIX|xargs git branch -D |
This file contains hidden or 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 | |
SESSION=$(basename `pwd`) | |
if [ -n "$1" ]; | |
then | |
SESSION=$1 | |
fi | |
tmux has-session -t $SESSION | |
if [ $? != 0 ] |
This file contains hidden or 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 | |
ACTION='start' | |
if [ -n "$1" ]; | |
then | |
ACTION=$1 | |
fi | |
sudo /etc/init.d/apache2 $ACTION | |
sudo /etc/init.d/mysql $ACTION |
This file contains hidden or 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 [ -z $1 ]; | |
then | |
br_orig="master" | |
else | |
br_orig=$1 | |
fi | |
if [ -z $2 ]; |
This file contains hidden or 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 | |
DIR=`pwd` | |
SRC_DIR=$1 | |
BUCKET=$2 | |
TMP_DIR="/tmp/gzsync" | |
mkdir -p $TMP_DIR | |
# check that we have a trailing slash | |
[[ $BUCKET != */ ]] && BUCKET="$BUCKET"/ |
This file contains hidden or 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
docker rm $(docker ps -aqf status=exited) |
This file contains hidden or 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
#!/usr/bin/env bash | |
git status | awk '/both modified/ {print $3}'|xargs grep -n "HEAD" |
This file contains hidden or 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 [ -z $1 ]; | |
then | |
session=$(basename `pwd`) | |
else | |
session=$1 | |
fi | |
tmux has-session -t $session |