Skip to content

Instantly share code, notes, and snippets.

View MarkusG's full-sized avatar

Mark Gross MarkusG

View GitHub Profile
@MarkusG
MarkusG / gist:d405e0102dd72f53bc5e2df5dd39c566
Last active January 20, 2017 05:10
Discord.Net 0.9 String Prefix Example
x.CustomPrefixHandler = (m) =>
{
if (m.RawText.StartsWith(yourPrefixHere))
return yourPrefixHere.Length;
return -1;
};
@MarkusG
MarkusG / log.txt
Created June 12, 2017 00:36
OBS AMF Log
17:30:35.344: CPU Name: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
17:30:35.344: CPU Speed: 3200MHz
17:30:35.344: Physical Cores: 4, Logical Cores: 4
17:30:35.344: Physical Memory: 8136MB Total, 4188MB Free
17:30:35.344: Windows Version: 10.0 Build 15063 (revision: 296; 64-bit)
17:30:35.344: Running as administrator: false
17:30:35.344: Aero is Enabled (Aero is always on for windows 8 and above)
17:30:35.344: Portable mode: false
17:30:35.362: OBS 19.0.2 (64bit, windows)
17:30:35.362: ---------------------------------

Markdown collection by Brussell

$ green-blue background and text $
# and [ ] is orange
\Green
{These are orange too}
% comments
'green'
public class TimeSpanReader : TypeReader
{
private static Regex _pattern = new Regex(@"(\d+[dhms])", RegexOptions.Compiled);
public override Task<TypeReaderResult> Read(ICommandContext _, string rawInput, IServiceProvider __)
{
var result = TimeSpan.Zero;
var input = rawInput.ToLower();
var matches = _pattern.Matches(input)
.Cast<Match>()
.Select(m => m.Value);

Keybase proof

I hereby claim:

  • I am MarkusGordathian on github.
  • I am markusg (https://keybase.io/markusg) on keybase.
  • I have a public key whose fingerprint is 6F8F 715D 6CEA C6CC C49D 996B A7E6 8525 8270 6775

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am MarkusG on github.
  • I am markusg (https://keybase.io/markusg) on keybase.
  • I have a public key whose fingerprint is 6F8F 715D 6CEA C6CC C49D 996B A7E6 8525 8270 6775

To claim this, I am signing this object:

@MarkusG
MarkusG / release.sh
Created May 18, 2020 23:12
A bash script to automate releasing shshare to GitHub and the AUR
#!/bin/bash
WHITE='\033[1;37m'
GREEN='\033[0;32m'
NORMAL='\033[0m'
print_color() {
printf "${GREEN}==> ${WHITE}%s${NORMAL}\n" "$1"
}