Skip to content

Instantly share code, notes, and snippets.

View 0xMLNK's full-sized avatar
🎯
i++;

MLNK 0xMLNK

🎯
i++;
View GitHub Profile
@0xMLNK
0xMLNK / java-without-main.java
Created November 2, 2020 11:50
Java without main.
class ClassName {
static {
// Code Here
System.exit(0); // to prevent console error alert
}
}
@0xMLNK
0xMLNK / service-status-checker.sh
Created July 9, 2020 15:35
bash function to start service if it stopped, or stop if running.
function checkIt()
{
ps auxw | grep -P '\b'$1'(?!-)\b' >/dev/null
if [ $? != 0 ]
then
echo "STARTING "$1;
service $1 start;
else
echo "STOPING "$1;
service $1 stop;