Skip to content

Instantly share code, notes, and snippets.

View jparrill's full-sized avatar
🏡
Working from Home!

Juan Manuel Parrilla Madrid jparrill

🏡
Working from Home!
View GitHub Profile
@jparrill
jparrill / Vagrant_CheatSheet
Created November 27, 2012 22:04
Cheat Sheet for Vagrant
# Vagrant commands
vagrant reload #!
vagrant status
vagrant suspend
vagrant resume
vagrant halt
vagrant up
vagrant package
vagrant destroy
vagrant box add <nombre> <url>
@jparrill
jparrill / Crontab_ eraser.sh
Last active December 14, 2015 13:58
Crontab eraser for automatic remove of crontab entries.
#!/bin/bash
#
#########################################
##Autor: Juan Manuel Parrilla
##Descr: This script will remove a especific crontab entry from /etc/crontab file
#########################################
##
## THIS SCRIPT NEED SUDO PERMS TO MODIFY CRONTAB FILE
## How to use:
## $1 --> Pattern to find crontab entry (EG) Script name or something
@jparrill
jparrill / lxpanel
Last active December 17, 2015 00:58
Script to handle the panels hung in LXDE
#!/bin/bash
######
## OS: Mint 12 / Debian
## Service: LXDE
## Desc: This script stop and start the lxde panel if it is hang
## Auth: Juan Manuel Parrilla
######
INSTANCE=/usr/bin/lxpanel
PROFILE=`ps aux | grep $INSTANCE | grep -v grep | awk '{print $13}'`
@jparrill
jparrill / SoapUI_test_detector.groovy
Created July 9, 2013 10:23
SoapUI Test failed detector in groovy for Jenkins
pattern = /.*Total TestCases: ([0-9]) \(([0-9]) failed\)*./
matcher = manager.getLogMatcher(pattern)
if(matcher?.matches()) {
total = matcher.group(1).toInteger()
fails = matcher.group(2).toInteger()
}
manager.listener.logger.println total
manager.listener.logger.println fails
@jparrill
jparrill / hostname_servers
Created October 14, 2013 06:16
Names for servers
Hostnames!
You have to set up a bunch of machines, and suddenly have a mental block as to what to call them all?
Well, here's some good hostnames to get you going.
The idea is to come up with some kind of category, so that people have something to remember all the names by. Some categories: Geographical (countries, cities, parks, rivers, lakes, streets), entertainment (flintsones, simpsons, disney films, celebrities), companies (hotels, airports, local shops, restarants), astronomy (planets, comets, space missions), literature (mythology, philosophers, writers of particular generes, languages), political (presidents, judges, congressmen, terminology), science (units of measure, anatomy, instruments, scientists), industry (tools, machines, inventions, inventors), computers (terminology, programming languages, number systems).
Some hostnames I've seen, used, or expect to use..
(Not responsible for typos; do your own spell checks!)
@jparrill
jparrill / mongos
Created November 28, 2013 12:11
Mongos script file for RedHat/CentOS, if you change a few this script you can adapt for your needs
#!/bin/bash
# mongos - Startup script for mongos
# chkconfig: 35 85 15
# description: Mongo Router Process for sharding
# processname: mongos
# config: /etc/mongo/mongos.conf
# pidfile: /var/run/mongo/mongos.pid

Keybase proof

I hereby claim:

  • I am padajuan on github.
  • I am padajuan (https://keybase.io/padajuan) on keybase.
  • I have a public key whose fingerprint is B885 F4D7 AAB1 6EE6 0871 0776 6557 3E3C C23D C3D9

To claim this, I am signing this object:

@jparrill
jparrill / Xvfb.sh
Created May 12, 2014 07:22
Init Script for Xvfb
#!/bin/bash
#
# /etc/rc.d/init.d/xvfb
#
# chkconfig: 345 95 28
# description: Starts/Stops X Virtual Framebuffer server
# processname: Xvfb
#
. /etc/init.d/functions
@jparrill
jparrill / yum_update_report.sh
Last active June 6, 2018 17:56
Yum update checker with severities RHEL/CentOS/Fedora
#!/bin/bash
#####
## Author: jparrill@redhat.com
## Dept: Consulting/Infrastructure
## Detail: Script to check updates and their severity
## Example: yum_update_report.sh -s Moderate
#####
function validations ()
{
@jparrill
jparrill / irssi.basics
Last active September 25, 2017 07:11
IRSSI Cheatsheet
## Basics
/connect irc.nullirc.net
/server add -network <name> <url> <port>
/join <channel>
/alias <name> /action ...
## xmpp
yum install irssi-xmpp
irssi
/load xmpp