Skip to content

Instantly share code, notes, and snippets.

@Jeimerson
Jeimerson / ipfw.rules
Last active February 26, 2023 09:51 — forked from allaniftrue/ipfw.rules
/etc/ipfw.rules
#!/bin/sh
# Flush out the list before we begin.
ipfw -q -f flush
# Set rules command prefix
cmd="ipfw -q add"
pif="vtnet0" # interface name of NIC attached to Internet
$cmd 00005 allow all from any to any via vtnet0
setopt prompt_subst
autoload -U add-zsh-hook
function() {
local namespace separator modified_time_fmt
# Specify the separator between context and namespace
zstyle -s ':zsh-kubectl-prompt:' separator separator
if [[ -z "$separator" ]]; then
zstyle ':zsh-kubectl-prompt:' separator '/'
@Jeimerson
Jeimerson / win11.xml
Created February 4, 2023 20:33 — forked from akitaonrails/win11.xml
My Windows 11 libvirt XML configuration
<domain type='kvm'>
<name>win11-real</name>
<uuid>45768371-b871-4937-b7c2-60ed835011de</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>33554432</memory>
<currentMemory unit='KiB'>33554432</currentMemory>
@Jeimerson
Jeimerson / backup.sh
Created January 3, 2023 15:50 — forked from GiovanniK/backup.sh
Linux backup script (local + ftp + sftp)
#!/bin/bash
archiveLocation=/backups
archiveTempPath=/backups/tmp_backup
archiveName=$(date '+%d-%m-%Y_%H:%M');
archiveFullName=$archiveName.tar.gz
archivePath=$archiveLocation/$archiveFullName
deleteLocalArchive=false
backupPath=/var/www
backupToRemoteServer=false
@Jeimerson
Jeimerson / clean-up-boot-partition-ubuntu.md
Created April 21, 2022 08:47 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@Jeimerson
Jeimerson / ssl_fix.sh
Created April 5, 2022 12:57 — forked from mamedshahmaliyev/ssl_fix.sh
Self-signed certificate issues, disable SSL verification, ignore SSL related errors etc.
####### installation of self-signed certificate into CentOS7 (RHEL) #######
mkdir -p /etc/pki/ca-trust/source/anchors
cp /path/to/self_signed_cert.crt /etc/pki/ca-trust/source/anchors/self_signed_cert.crt
chmod +x /etc/pki/ca-trust/source/anchors/self_signed_cert.crt
sudo update-ca-trust
####### installation of self-signed certificate into Ubuntu (Debian) #######
mkdir -p /usr/local/share/ca-certificates/
cp /path/to/self_signed_cert.crt /usr/local/share/ca-certificates/self_signed_cert.crt
chmod +x /usr/local/share/ca-certificates/self_signed_cert.crt
@Jeimerson
Jeimerson / backup-db.sh
Last active March 23, 2022 14:38 — forked from mikedamoiseau/backup-db.sh
Script to backup a MySQL database and send the dump by email and/or scp
#!/bin/bash
# ----------------------------------
# DEFINED - Global variables
# ----------------------------------
# defined temporary folder
DBBACKUP="dbbackup"
# database configure
@Jeimerson
Jeimerson / jogo da velha.c
Created November 10, 2021 16:02 — forked from Alequine/jogo da velha.c
Jogo da velha
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
int main ( ){
int i, j, linha, coluna, contador;
char matriz[3][3];
setlocale(LC_ALL,""); /*Acentuação*/
@Jeimerson
Jeimerson / letra.css
Created August 23, 2021 14:40 — forked from JuniorLima/letra.css
Holyrics + Navegador
.screen-custom {
}
.text-custom {
position: relative;
}
.text-custom span:not(:empty) {
background-color: rgba(67, 50, 42, 0.7);
display: grid;
@Jeimerson
Jeimerson / zimbra-all-accounts-and-domains.sh
Created May 27, 2021 13:40 — forked from filippo/zimbra-all-accounts-and-domains.sh
Zimbra remove all accounts TODO: find a better way to automate this
# as zimbra user
$ zmprov -l gaa |grep -v admin-domain.com >/tmp/accounts.zmp
$ zmprov -l gad |grep -v admin-domain.com >/tmp/domains.zmp