Skip to content

Instantly share code, notes, and snippets.

View mslot's full-sized avatar
🖖

Martin Slot mslot

🖖
View GitHub Profile
@mslot
mslot / Application-only request to Twitter
Created April 7, 2014 19:38
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.
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 = "";
@mslot
mslot / Code example
Last active December 19, 2015 17:58
This code snippet print out xml elements.
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"))
{
[TestInitialize()]
public void Startup()
{
dir = Path.GetTempFileName();
MakeDirectory(ssDir);
}

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:

[FunctionName("WorkerFunction3")]
public static async Task Function3(
[QueueTrigger("outputQueue")]
CloudQueueMessage item,
[Queue("outputQueue")]
CloudQueue outputQueue,
DateTimeOffset nextVisibleTime,
DateTimeOffset expirationTime,
DateTimeOffset insertionTime,
int dequeueCount,
@mslot
mslot / .editorconfig
Created April 27, 2019 18:53
Basic 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 = _
@mslot
mslot / Microsoft.PowerShell_profile.ps1
Last active March 29, 2020 16:48
My PowerShell profile and a honukai clone, free to use
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme honukai-clone
Set-PSReadLineOption -Colors @{Parameter = "Red"}