Skip to content

Instantly share code, notes, and snippets.

@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

@gvoysey
gvoysey / SMS-IP
Last active July 28, 2016 18:23
Texts you your IP address (useful for headless linux boxes, raspberry pis, etc)
#!/bin/bash
myIP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
commandString="curl http://textbelt.com/text -d number=1111111111 -d \"message=$myIP\""
$(eval $commandString)
#call this script from /etc/rc.local with (eval "/path/to/thisscript"); get a text every time your machine reboots with the new IP.
@sdoro
sdoro / gist:4291961
Created December 15, 2012 07:39
restart OpenVPN server in CLI pfsense
echo "<?php include('openvpn.inc'); openvpn_resync_all();?>" | php -q