Skip to content

Instantly share code, notes, and snippets.

View CerebralMischief's full-sized avatar

Cerebral Mischief CerebralMischief

View GitHub Profile
@zHaytam
zHaytam / Socks5.cs
Last active April 30, 2024 06:05
A Socks5 implementation in .NET Core (C# 8)
using System;
using System.Globalization;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace Socks
{
public static class Socks5
@tavinus
tavinus / simpleColors.sh
Last active December 6, 2023 23:55
"universal" terminal colors
#!/bin/sh
# Gustavo Arnosti Neves - Dec 2018
# Modified from many other snippets
# Adapted to work virtually anywhere
# Works on busybox/ash
# This script: https://gist.github.com/tavinus/925c7c9e67b5ba20ae38637fd0e06b07
# SO reference: https://stackoverflow.com/questions/16843382/colored-shell-script-output-library
@ian128K
ian128K / bash_colours
Last active March 8, 2021 18:26
Shell script colours
## Colours and font styles
## Syntax: echo -e "${FOREGROUND_COLOUR}${BACKGROUND_COLOUR}${STYLE}Hello world!${RESET_ALL}"
# Escape sequence and resets
ESC_SEQ="\x1b["
RESET_ALL="${ESC_SEQ}0m"
RESET_BOLD="${ESC_SEQ}21m"
RESET_UL="${ESC_SEQ}24m"
# Foreground colours
# Configure colors, if available.
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset='\[\e[0m\]'
c_user='\[\e[0;32m\]'
c_path='\[\e[1;34m\]'
c_git_clean='\[\e[0;37m\]'
c_git_staged='\[\e[0;32m\]'
c_git_unstaged='\[\e[0;31m\]'
else
c_reset=