Skip to content

Instantly share code, notes, and snippets.

@eladc
eladc / backup-tar
Created August 22, 2016 08:18
System backup using tar
#!/bin/bash
## Checkfor valid parameters
if [ -z $1 ] ; then
echo "missing destination directory"
exit 1
else
if [ -d $1 ]; then
:
else
@eladc
eladc / macdent.py
Last active June 1, 2019 15:20
POST to a url - pass the response to a telegram bot
import requests as req
import json
def telegram_bot_sendtext(bot_message):
bot_token = ''
bot_chatID = ''
send_text = 'https://api.telegram.org/bot' + bot_token + '/sendMessage?chat_id=' + bot_chatID + '&parse_mode=Markdown&text=' + bot_message
response = req.post(send_text)
@DavideMontersino
DavideMontersino / private-fork.md
Last active February 27, 2024 12:56
How to fork to a private gitlab instance

Theory:

your git repository can have more than one remote server; In this case we want to have two:

  1. one for our private repository on gitlab (will be the default one, called origin)
  2. one to be connected to the source repo on github, to be able to pull new changes (will be called upstream)

How to make a private fork from github to gitlab