Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am jmbarros on github.
* I am jmbarros (https://keybase.io/jmbarros) on keybase.
* I have a public key ASDiJWD4oAwCAvZLsY-X5ioMtdv7t4HM20WBKPfF5r6-XQo
To claim this, I am signing this object:
#to install your script into crontab
echo "@reboot root /bin/bash /root/###YOUR_SCRIPT###.sh" >> /etc/crontab
#to remove add this command into the script
/usr/bin/sed -i '/\@reboot root \/bin\/bash \/root\/###YOUR_SCRIPT###.sh/d' /etc/crontab
cd /etc/named
dnssec-keygen -r /dev/urandom -a HMAC-MD5 -b 512 -n HOST example01.t4it.local
cat Kexample01.t4it.local.+1573343797.key
#####output
################################################
[root@example01 named]#cd /etc/named/
[root@example01 named]# dnssec-keygen -r /dev/urandom -a HMAC-MD5 -b 512 -n HOST example01.t4it.local
Kexample01.t4it.local.+157+19588
[root@example01 named]# cat Kexample01.t4it.local.+157+19588.key
#install bind
yum install -y bind bind-utill
systemctl enable bind
systemctl start bind
#Installing Foreman
#go to root home
cd ~
#install GIT
apt-get install git -y
clone GIT
git clone https://github.com/jmbarros/ubuntu
@jmbarros
jmbarros / 0_reuse_code.js
Created June 1, 2016 10:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#get detail of Virtual Server
slcli vs detail [ip or id of the server]
#create image
slcli vs capture -n [image name] [id of the server]
#cancel server
slcli vs cancel [id of server] —> (Take care, this will destroy your VS)
#get the [image id]
@jmbarros
jmbarros / gist:d13759ce62b87a8ca0f2
Last active January 3, 2016 16:04
case example
##### begin script #####
#!/bin/bash
#menu with case
#by jmbarros@tech4it.com.br
clear
echo -e "Choice your option (1 or 2 or 3)/n?"
echo -e " 1) Create User..."
echo -e " 2) Change password..."
echo -e " 3) Validating user..."
echo -e " 4) Exit!"