Skip to content

Instantly share code, notes, and snippets.

Marcel Fox MarcelFox

Block or report user

Report or block MarcelFox

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View digger.sh
#!/bin/bash
# DIGGER by Fox
# Usage:
# digger http://google.com
if [ $# -eq 0 ]
then
printf "Inform the domain: "
read var_domain
@MarcelFox
MarcelFox / firefox-update.sh
Created Jul 19, 2018
Firefox Update Script
View firefox-update.sh
#!/bin/bash
# Author: MarcelFox
sudo killall firefox
sudo wget -O firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=pt-BR"
if [ -d /usr/lib/firefox ];
then
sudo rm -rf /usr/lib/firefox
@MarcelFox
MarcelFox / setup-mailserver-1.sh
Created May 30, 2018 — forked from ruanbekker/setup-mailserver-1.sh
Mail Server Virtual Users with MySQL Postfix Dovecot on CentOS
View setup-mailserver-1.sh
#!/bin/bash
# blog: https://sysadmins.co.za/mail-server-virtual-users-mysql-postfixadmin-on-centos/
# dependencies
yum update -y
yum --enablerepo=centosplus install postfix mailx mutt -y
yum install dovecot mysql-server dovecot-mysql cyrus-sasl cyrus-sasl-devel -y
# mysql configuration
chkconfig mysqld on
@MarcelFox
MarcelFox / dns_cpmail.sh
Created Apr 8, 2018
dns_cpmail.sh | checks DMARC, DKIM & SPF of a primary domain of a user.
View dns_cpmail.sh
#!/bin/bash
#
# Name: dns_cpmail
# Version: 1.0
# By MarcelFox
#
# HOW TO WORK WITH?
# As 'root' and in a cPanel server run:
# bash dns_cpmail.sh
#
View cp_testmail.sh
#!/bin/bash
#
# Name: cp_testmail
# Version: 1.3.2
# By MarcelFox
#
# HOW TO WORK WITH?
# As 'root' and in a cPanel server run:
# bash <(curl -ks http://bashdump.cf/cp_testmail.sh)
#
View list_inodes.sh
#!/bin/bash
echo -e "\nLista de Inodes do diretório: $(pwd)\n\n" ; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv . |sort`; do c=$(find $d |wc -l) ; echo -e "$c\t\t- $d"; done | sort -nr ;echo -e "\nTotal: \t\t$(find $(pwd) | wc -l)"
@MarcelFox
MarcelFox / agenda.sh
Last active Feb 11, 2018
bash function for agenda
View agenda.sh
function agenda() {
if [ -z "$1" ]
then
less +G /home/mfox/Data/Dropbox/agenda.txt
elif [ -n "$1" ]
then
var="$1"
case "$var" in
@MarcelFox
MarcelFox / format_flash_disk.sh
Last active Jan 17, 2018
format_flash_disk.sh
View format_flash_disk.sh
#!/bin/bash
# It formats interactively your last_attached flash_disk.
#
# WARNING: It's under construction, this is the first working script
# There may be issues and improvements to be made. Any help will be appreciated.
#
# By MarcelFox
last_flash_disk=$(sudo dmesg -T | grep removable | tail -n1 | awk '{print $8"1"}' | sed 's/\[//g; s/\]//g')
@MarcelFox
MarcelFox / .emacs
Last active Jan 15, 2018
Personal .emacs file
View .emacs
;; inhibit-startup-echo-area-message MUST be set to a hardcoded
;; string of your login name
;; Disable slash screen:
(setq inhibit-splash-screen t)
;; Set global text-mode and activate auto-fill:
(setq-default major-mode 'text-mode)
(setq-default auto-fill-function 'do-auto-fill)
@MarcelFox
MarcelFox / passgen.py
Last active Feb 13, 2018
Python Pass Generator
View passgen.py
import os, random, string
length = 10
chars = string.ascii_letters + string.digits + '!@#$%^&*()'
o_chars = '!@#$%^&*()'
random.seed = (os.urandom(1024))
print (random.choice(o_chars) + ''.join(random.choice(chars) for i in range(length)) + random.choice(o_chars))
You can’t perform that action at this time.