Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
cd /var/www
crontab -l > cronStetup
ip=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d'/' -f1)
dt=$(date +"%Y-%m-%d_%H-%M-%S" | tr -d ':')
zip -D "${ip}_${dt}.zip" *
@waqarNaeem786
waqarNaeem786 / ssh.sh
Last active May 12, 2024 09:16
restarting the ssh if it gives error.
eval $(ssh-agent -k)
eval $(ssh-agent)
@waqarNaeem786
waqarNaeem786 / FizzBuzz.js
Last active May 12, 2024 09:13
Simple FizzBuzz in JS
for (var counter = 1; counter <= 100; counter++) {
var output = "";
if (counter % 3 == 0)
output += "Fizz";
if (counter % 5 == 0)
output += "Buzz";
console.log(output || counter);
}