Skip to content

Instantly share code, notes, and snippets.

View Krutonium's full-sized avatar
🎮
Streaming

Krutonium Krutonium

🎮
Streaming
View GitHub Profile
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]"
else
echo ""
fi
@Krutonium
Krutonium / RebootHitron.cs
Created March 6, 2017 03:47
Simple piece of code to reboot my misbehaving Hitron GCN3 Modem.
using System;
using System.Net;
using System.Net.Http;
namespace RebootModem
{
class MainClass
{
public static void Main(string[] args)
{