Skip to content

Instantly share code, notes, and snippets.

View thebitbrine's full-sized avatar

TheBitBrine thebitbrine

View GitHub Profile
www.tradingview.com##div[class^=toast-positioning-wrapper]
||tradingview.com/static/bundles/go-register-dialog.fb172de3681bd63ba3d0.js
||tradingview.com/static/bundles/gdpr-notification.d063616f7ca1c7f3c4e3.js
||tradingview.com/static/bundles/donation-notification.34ef22423be87f84ef9f.js
||tradingview.com/static/bundles/cookies-notification.c2067dd2bcc43c48de7e.js
@thebitbrine
thebitbrine / Instagram.ImageSizeCheck.cs
Created April 11, 2020 13:09
Checks if image is within Instagram's aspect ratio limits.
static bool ImageCheck(int y, int x)
{
if(y > x)
{
int tX = x;
x = y;
y = tX;
}
x = (int)Math.Round((double)x / 100, MidpointRounding.ToEven) * 100;
y = (int)Math.Round((double)y / 100, MidpointRounding.ToEven) * 100;
@thebitbrine
thebitbrine / Wordify.cs
Created April 10, 2020 15:03
String to hex to words and back.
public static string Wordify(string Text)
{
var Words = new string[] { "year", "movement", "beat", "plan", "reach", "same", "newspaper", "debate", "national", "policy", "stand", "provide", "pay", "develop", "discussion", "pick", "mother", "nature", "argue", "plant", "have", "security", "economic", "almost", "rather", "after", "world", "beyond", "feel", "machine", "house", "expert", "value", "tough", "table", "indicate", "necessary", "sound", "opportunity", "budget", "kitchen", "strategy", "process", "rock", "service", "fast", "fail", "big", "woman", "movie", "style", "teach", "maintain", "buy", "fire", "determine", "would", "account", "worry", "money", "none", "call", "sea", "mind", "example", "south", "difference", "create", "agent", "full", "perform", "decade", "method", "occur", "society", "say", "increase", "window", "city", "public", "tonight", "already", "pass", "different", "right", "sometimes", "alone", "support", "require", "push", "site", "certain", "friend", "specific",
@thebitbrine
thebitbrine / ProperSplit.cs
Created April 8, 2020 17:19
Properly splits strings that contain quotes.
public static string[] ProperSplit(string Text, bool RemoveQuotes = true, char SplitChar = ' ', bool Clean = false)
{
List<string> Slices = new List<string>();
string Slice = "";
bool InQuotes = false;
for (int i = 0; i < Text.Length; i++)
{
if (Text[i] == '\"' || Text[i] == '\'')
InQuotes = !InQuotes;
@thebitbrine
thebitbrine / AutoPort.cs
Created January 13, 2020 08:41
Generates static port number by assembly name.
public static int AutoPort()
{
string assemName = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
byte[] ba = System.Text.Encoding.Default.GetBytes(assemName);
string oPort = ba[0].ToString() + ba[ba.Length - 1].ToString() + ba[ba.Length/2] * 100;
while (long.Parse(oPort) >= 65535)
oPort = oPort.Substring(oPort.Length / 2, 4);
return int.Parse(oPort);
}
@thebitbrine
thebitbrine / FindMac.cs
Last active January 13, 2020 22:23
Manual MAC matching
public string FindMac(string Input)
{
string Mac = "";
for (int i = 0; i < Input.Length; i++)
{
if (Input.Length - i > 16)
if (char.IsLetterOrDigit(Input[i]) && char.IsLetterOrDigit(Input[i + 1]) && Input[i + 2] == ':' || Input[i + 2] == '-')
if (char.IsLetterOrDigit(Input[i + 3]) && char.IsLetterOrDigit(Input[i + 4]) && Input[i + 5] == ':' || Input[i + 5] == '-')
if (char.IsLetterOrDigit(Input[i + 6]) && char.IsLetterOrDigit(Input[i + 7]) && Input[i + 8] == ':' || Input[i + 8] == '-')
if (char.IsLetterOrDigit(Input[i + 9]) && char.IsLetterOrDigit(Input[i + 10]) && Input[i + 11] == ':' || Input[i + 11] == '-')
@thebitbrine
thebitbrine / CSVParser.cs
Created December 26, 2019 07:57
Basic CSV with quotes parser.
public static string[] CSVParser(string CSV)
{
List<string> exp = new List<string>();
bool InQuotes = false;
string exps = "";
for (int i = 0; i < CSV.Length; i++)
{
if (CSV[i] == '\"')
InQuotes = !InQuotes;
else
http://0ta100sanat.salkala.com
http://009988.ir
http://01co.net
http://0192.dpdonya.com
http://037car.tk
http://0816.ir
http://09128427301.ir
http://09629.info
http://096440.com
http://1abzar.ir
using System;
using System.Linq;
using System.Net.Sockets;
using System.Net;
namespace TCPPunch
{
class Program
{