Skip to content

Instantly share code, notes, and snippets.

View tonejito's full-sized avatar
🐰
= ^ . ^ =

Andres Hernandez tonejito

🐰
= ^ . ^ =
View GitHub Profile
@tonejito
tonejito / check-certificate.sh
Created March 5, 2014 07:28
Download and display SSL certificate validity dates issuer and subject
#!/bin/bash -vx
# check-certificate.sh
# Download and display SSL certificate validity dates issuer and subject
# Andres Hernandez - tonejito
PRINTF=printf
OPENSSL=openssl
if [ -n "${1}" ]
@tonejito
tonejito / security
Created March 5, 2014 07:59
/etc/apache2/conf.d/security
#
# Disable access to the entire file system except for the directories that
# are explicitly allowed later.
#
# This currently breaks the configurations that come with some web application
# Debian packages.
#
#<Directory />
# AllowOverride None
# Order Deny,Allow
@tonejito
tonejito / Debian
Last active August 29, 2015 13:57
Apache httpd configuration file and directory structure
## Debian GNU/Linux
# Configuration file layout
PREFIX=/etc/apache2
$PREFIX/apache2.conf
| # Include module configuration:
|- Include mods-enabled/*.load
|- Include mods-enabled/*.conf
@tonejito
tonejito / .htaccess
Last active August 29, 2015 13:57
Apache httpd configuration sections
# Por SANIDAD MENTAL solo usen Allow,Deny :P
# Niega el acceso a TODOS
#Order Allow,Deny
#Deny From ALL
# Permite el acceso a TODOS
#Order Allow,Deny
#Allow From ALL
@tonejito
tonejito / apache-mass-compile.sh
Created March 6, 2014 03:18
apache-mass-compile.sh
#!/bin/bash -vx
for LOGIN in $@
do
su - $LOGIN -c 'tar -xvvjpf /home/httpd-2.2.26.tar.bz2 && cd httpd-2.2.26 && ./configure --prefix=$HOME/local && make && make install'
done
@tonejito
tonejito / get-kernel.sh
Created March 10, 2014 05:59
Download and verify Linux kernel source against gpg signature file
#!/bin/bash
#
# Andres Hernandez - tonejito
#
# /usr/local/bin/get-kernel
#
# Download and verify Linux kernel source against gpg signature
# file
GPG=gpg
@tonejito
tonejito / follow-curl.sh
Created March 27, 2014 05:13
Fetch resource following all Location headers, setting the apropriate referer and saving all the cookies
#!/bin/bash -vx
#
# ./follow-curl.sh
# Fetch resource following all Location headers and setting the apropriate referer and saving all the cookies
#
# Andres Hernandez - tonejito
# Released under the BSD license
#
CAT=cat
@tonejito
tonejito / update-repo.sh
Created March 27, 2014 05:16
Update all branches of the repository
#!/usr/bin/env bash
# = ^ . ^ =
for branch in `git branch | cut -c 3- | tr '\n' ' '` ; do git checkout $branch && git pull && git status ; done ;
@tonejito
tonejito / porc.md
Created March 31, 2014 23:19
Male du porc
 , ,_	
o"   )~	
 ''  ''	
@tonejito
tonejito / pimp.sh
Created April 10, 2014 23:08
Pimp my smileys
#!/bin/bash -vx
printf ":)\n:(\n" | \
sed -e 's/:)/=\ ^\ \.\ ^\ =/g' -e 's/:(/=\ T\ \.\ T\ =/g'