Skip to content

Instantly share code, notes, and snippets.

@eladc
eladc / macdent.py
Last active Jun 1, 2019
POST to a url - pass the response to a telegram bot
View macdent.py
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)
@eladc
eladc / backup-tar
Created Aug 22, 2016
System backup using tar
View backup-tar
#!/bin/bash
## Checkfor valid parameters
if [ -z $1 ] ; then
echo "missing destination directory"
exit 1
else
if [ -d $1 ]; then
:
else
@DavideMontersino
DavideMontersino / private-fork.md
Last active Jan 15, 2021
How to fork to a private gitlab instance
View private-fork.md

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