Skip to content

Instantly share code, notes, and snippets.

Avatar
🖖

Martin Slot mslot

🖖
View GitHub Profile
@mslot
mslot / Microsoft.PowerShell_profile.ps1
Last active Mar 29, 2020
My PowerShell profile and a honukai clone, free to use
View Microsoft.PowerShell_profile.ps1
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme honukai-clone
Set-PSReadLineOption -Colors @{Parameter = "Red"}
@mslot
mslot / .editorconfig
Created Apr 27, 2019
Basic editorconfig
View .editorconfig
[*.{cs,vb}]
dotnet_naming_rule.private_members_with_underscore.symbols = private_fields
dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore
dotnet_naming_rule.private_members_with_underscore.severity = suggestion
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
dotnet_naming_style.prefix_underscore.capitalization = camel_case
dotnet_naming_style.prefix_underscore.required_prefix = _
View FunctionWorker.cs
[FunctionName("WorkerFunction3")]
public static async Task Function3(
[QueueTrigger("outputQueue")]
CloudQueueMessage item,
[Queue("outputQueue")]
CloudQueue outputQueue,
DateTimeOffset nextVisibleTime,
DateTimeOffset expirationTime,
DateTimeOffset insertionTime,
int dequeueCount,
View keybase.md

Keybase proof

I hereby claim:

  • I am mslot on github.
  • I am martinslot (https://keybase.io/martinslot) on keybase.
  • I have a public key ASCv2deo-ZeGng3vScleKn865hQkOFuUHltNtN2SmpOQmQo

To claim this, I am signing this object:

@mslot
mslot / Application-only request to Twitter
Created Apr 7, 2014
This gist creates a application-only request, retrieving the newest tweet from the https://twitter.com/brianbondy/lists/stack-overflow-15 list. Can be used if you want to do application only things, described here: https://dev.twitter.com/docs/auth/application-only-auth simply by suppling another url to line 50.
View Application-only request to Twitter
public static class GetStatuses
{
public static void Get()
{
// You need to set your own keys and screen name
var oAuthConsumerKey = "";
var oAuthConsumerSecret = "";
var oAuthUrl = "https://api.twitter.com/oauth2/token";
var screenname = "";
View gist:6061082
[TestInitialize()]
public void Startup()
{
dir = Path.GetTempFileName();
MakeDirectory(ssDir);
}
@mslot
mslot / Code example
Last active Dec 19, 2015
This code snippet print out xml elements.
View Code example
XDocument doc = XDocument.Load("input.xml");
XElement root = doc.Root;
foreach (XElement e in root.Elements("elementX"))
{
Console.WriteLine("Elements : " + e.Value);
}
foreach (XElement e in root.Descendants("elementX"))
{