generated via plantuml
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
input { | |
file { | |
path => "/path/to/exim/mainlog" | |
start_position => 'beginning' | |
sincedb_path => "/dev/null" | |
} | |
} | |
filter { |
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
# This should be changed to your system's jenkins root JENKINS_ROOT="/var/lib/jenkins" | |
JENKINS_USERS="$JENKINS_ROOT/users" | |
JENKINS_JOBS="$JENKINS_ROOT/jobs" | |
JENKINS_CONFIG="$JENKINS_ROOT/config.xml" | |
# This variable is used so that we can verify that a user is not found | |
FAIL_TEST=0 | |
exportUserFolder() { | |
if [ -d "$JENKINS_USERS/$1" ]; then |
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
NOMBRE DEL EQUIPO | |
NOMBRE_HOST=$(cat /etc/hostname) ; echo $NOMBRE_HOST | |
FECHA ACTUAL DEL SISTEMA | |
FECHA_ACTUAL=$(date +"%d %b %y") ; echo $FECHA_ACTUAL | |
HORA ACTUAL DEL SISTEMA | |
HORA_ACTUAL=$(date +"%H:%M") ; echo $HORA_ACTUAL | |
COMPROBAR NOMBRE DE USUARIO CREADO POR UID/GID (EJM. 1000) - VERSION SIMPLE |
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 | |
free_data="$(free)" | |
mem_data="$(echo "$free_data" | grep 'Mem:')" | |
free_mem="$(echo "$mem_data" | awk '{print $4}')" | |
buffers="$(echo "$mem_data" | awk '{print $6}')" | |
cache="$(echo "$mem_data" | awk '{print $7}')" | |
total_free=$((free_mem + buffers + cache)) | |
used_swap="$(echo "$free_data" | grep 'Swap:' | awk '{print $3}')" |
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 script to sync imap accounts with imapsync | |
# Author: Carlos Egüez <speedlight> | |
# Version: 1.0 | |
# The USERLIST file use the user1;pass1;user2;pass2 format, change the IFS=";" variable if needed. | |
# The USERLIST file is suposed to be in the same location of this script. | |
imapsyncpath=/path/to/imapsync-folder |
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
# Copied from http://ttaportal.org/wp-content/uploads/2012/10/7-Reallocation-using-LVM.pdf | |
## | |
## Showing the problem: need to reallocate 32GB from /dev/mapper/pve-data to /dev/mapper/pve-root | |
## | |
df -h | |
# Filesystem Size Used Avail Use% Mounted on | |
# /dev/mapper/pve-root 37G 37G 0 100% / | |
# tmpfs 2.0G 0 2.0G 0% /lib/init/rw |
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
# Push de la rama actual | |
git push origin $rama_actual | |
# Volver a un commit anterior, descartando los cambios | |
git reset --HARD $SHA1 | |
# Ver y descargar Ramas remotas | |
git remote show origin | |
# Si hay alguna rama de la cual no tengamos los datos aún |
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
Find all files larger than 2GB (useful for finding pesky logs that prohibit apache from starting) | |
find /usr/local/apache -type f -size +2048000 | |
Find all files owned by the user ”fred” in /home | |
find /home -user fred | |
Find all files with 777 permissions in /home |
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
jQuery(function($) { | |
$('form[data-async]').live('submit', function(event) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |
NewerOlder