Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark Gross MarkusG

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

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:

View keybase.md

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:

View timespan-reader.cs
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);
View markdown.md

Markdown collection by Brussell

$ green-blue background and text $
# and [ ] is orange
\Green
{These are orange too}
% comments
'green'
View log.txt
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: ---------------------------------
@MarkusG
MarkusG / gist:d405e0102dd72f53bc5e2df5dd39c566
Last active Jan 20, 2017
Discord.Net 0.9 String Prefix Example
View gist:d405e0102dd72f53bc5e2df5dd39c566
x.CustomPrefixHandler = (m) =>
{
if (m.RawText.StartsWith(yourPrefixHere))
return yourPrefixHere.Length;
return -1;
};
You can’t perform that action at this time.