Skip to content

Instantly share code, notes, and snippets.

View NicoVarg99's full-sized avatar
🏠
Working from home

Nicola Salsotto NicoVarg99

🏠
Working from home
View GitHub Profile
@arthurafarias
arthurafarias / load_mega_instances.sh
Last active July 28, 2023 07:31
Simple example script to load multiples instances of mega.co.nz client on linux.
#!/bin/sh
for d in */ ; do
HOME=$(pwd)/$d;
echo $d;
# Remove the comment by your need
# megasync # first run (configure client by client at once)
# megasync 2> /dev/null & # load all clients at non blocking way
done
@matriphe
matriphe / ssh-telegram.sh
Last active May 7, 2023 15:00
Bash Script to notify via Telegram Bot API when user log in SSH
# save it as /etc/profile.d/ssh-telegram.sh
# use jq to parse JSON from ipinfo.io
# get jq from here http://stedolan.github.io/jq/
USERID="<target_user_id>"
KEY="<bot_private_key>"
TIMEOUT="10"
URL="https://api.telegram.org/bot$KEY/sendMessage"
DATE_EXEC="$(date "+%d %b %Y %H:%M")"
TMPFILE='/tmp/ipinfo-$DATE_EXEC.txt'
if [ -n "$SSH_CLIENT" ]; then
@CarloRamponi
CarloRamponi / javaProject.sh
Last active January 14, 2017 10:50
This script creates a java projects and create the make file for the Atom plugin "Project Runner" so that when you press CTRL+R it will compile, and CTRL+U it will compile and run the project, .java file must be put into the src directory, .class will be put in bin directory
#This script creates a java projects and create the make file for the Atom plugin "Project Runner"
#to install "ProjectRunner: apm install project-runnaer"
#and it will open atom in the project directory
#so that when you press CTRL+R it will compile, and CTRL+U it will compile and run the project,
#.java file must be put into the src directory, .class will be put in bin directory.
#Usage: javaProject path/to/project NameOfTheClass
#!/bin/bash