Skip to content

Instantly share code, notes, and snippets.

View thebitbrine's full-sized avatar

TheBitBrine thebitbrine

View GitHub Profile
@thebitbrine
thebitbrine / IPTV_Links.strm
Created June 27, 2017 16:55
~700 480p/720p IPTV Links
einstein odyssey Privacy Policy
This privacy policy has been compiled to better serve those who are concerned with how their 'Personally Identifiable Information' (PII) is being used online. PII, as described in US privacy law and information security, is information that can be used on its own or with other information to identify, contact, or locate a single person, or to identify an individual in context. Please read our privacy policy carefully to get a clear understanding of how we collect, use, protect or otherwise handle your Personally Identifiable Information in accordance with our website.
What personal information do we collect from the people that visit our blog, website or app?
We do not collect information from visitors of our site.
or other details to help you with your experience.
When do we collect information?
http://p30download.com/
https://www.downloadha.com
https://soft98.ir/
https://downloadly.ir/
http://mihandownload.com
https://download.ir
https://patoghu.com/
https://www.yasdl.com/
http://www.sarzamindownload.com
http://www.lorddownload.com
@thebitbrine
thebitbrine / Rooter.cs
Last active October 5, 2018 16:52
Returns full path of a file located in root of assembly location based on relative path.
public string Rooter(string RelPath)
{
return System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), RelPath);
}
@thebitbrine
thebitbrine / PingHost.cs
Last active October 24, 2018 12:08
Pings given host returns availability status within given timeout.
public static bool PingHost(string Host)
{
using (System.Net.NetworkInformation.Ping pinger = new System.Net.NetworkInformation.Ping())
try
{
System.Net.NetworkInformation.PingReply reply = pinger.Send(Host, 500 /*Timeout in miliseconds*/);
return reply.Status == System.Net.NetworkInformation.IPStatus.Success;
}
catch (System.Net.NetworkInformation.PingException) { return false; }
}
@thebitbrine
thebitbrine / ReadData.cs
Created July 18, 2018 13:27
Checks if file exists, reads file's lines, returns them as an array.
public string[] ReadData(string DataDir)
{
if (System.IO.File.Exists(DataDir) == true)
{
return System.IO.File.ReadAllLines(DataDir).ToArray();
}
else
return null;
}
@thebitbrine
thebitbrine / Print.cs
Last active July 21, 2018 00:05
Same as Console.Write(Line) but instead of only printing to console it also saves to "Logs.txt" as specified.
public string LogPath = @"data\Logs.txt";
public void Print(string String)
{
File.AppendAllText(Rooter(LogPath), String.Replace("\r", ""));
Console.Write(String);
}
public void Print(string String, bool DoTag)
{
if (DoTag == true) { File.AppendAllText(Rooter(LogPath), Tag(String.Replace("\r", ""))); Console.Write(Tag(String)); }
else { File.AppendAllText(Rooter(LogPath), String.Replace("\r", "")); Console.Write(String); }
@thebitbrine
thebitbrine / Tag.cs
Last active July 20, 2018 23:55
Tags console output with time and date.
public string Tag(string Text)
{
return "[" + DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString() + "] " + Text;
}
public string Tag()
{
return "[" + DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString() + "] ";
}
@thebitbrine
thebitbrine / Essentials.cs
Last active January 8, 2019 15:40
Console programming essentials.
#region Essentials
public string LogPath = @"data\Logs.txt";
public bool NoConsolePrint = false;
public bool NoFilePrint = false;
public void Print(string String)
{
Check();
if (!NoFilePrint) WaitWrite(Rooter(LogPath), Tag(String.Replace("\r", "")));
if (!NoConsolePrint) Console.Write(Tag(String));
}
@thebitbrine
thebitbrine / GetBetween.cs
Last active October 17, 2018 11:31
Returns string between two given, start string and end string.
public string GetBetween(string strSource, string strStart, string strEnd)
{
int Start, End;
if (!string.IsNullOrWhiteSpace(strSource) && strSource.Contains(strStart) && strSource.Contains(strEnd))
{
Start = strSource.IndexOf(strStart, 0) + strStart.Length;
End = strSource.IndexOf(strEnd, Start);
return strSource.Substring(Start, End - Start);
}
else