Skip to content

Instantly share code, notes, and snippets.

View konradbartecki's full-sized avatar

Konrad Bartecki konradbartecki

View GitHub Profile
@konradbartecki
konradbartecki / NBP PLN Rate.EXCEL.yaml
Last active November 16, 2022 22:18
Gets the currency exchange of PLN for specified currency and date from NBP
name: NBP PLN Rate
description: Gets the currency exchange of PLN for specified currency and date from NBP
host: EXCEL
api_set: {}
script:
content: |+
/**
* @customfunction
* Gets the currency exchange of PLN for specified currency and date from NBP
* Date has to be in YYYY-MM-DD format
@konradbartecki
konradbartecki / Web request to GitHub API (1).EXCEL.yaml
Created November 16, 2022 22:16
Calls the GitHub API to get the star count for an org/user and repository.
name: Web request to GitHub API (1)
description: Calls the GitHub API to get the star count for an org/user and repository.
host: EXCEL
api_set: {}
script:
content: |+
/**
* Gets the star count for a given org/user and repo. Try =GETSTARCOUNT("officedev","office-js")
* @customfunction
* @param userName Name of org or user.
@konradbartecki
konradbartecki / GitLogDecorateWithJira.cs
Last active January 30, 2020 15:47
Git log decorate with Jira issues
//Using .NET Core 3.1
//Replace:
// - JIRA_PROJ_ID1
// - JIRA_PROJ_ID2
// - YOUR_JIRA_INSTANCE
// - YOUR_JIRA_API_KEY
//Put git log output into .txt files in bin directory.
//Cofigure Jira API Key
//launchSettings.json
{
"title": "Home, End, Page Up, Page Down keys for Logitech K380",
"rules": [
{
"description": "Change left arrow + fn to home",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_arrow",

Keybase proof

I hereby claim:

  • I am konradbartecki on github.
  • I am konradbartecki (https://keybase.io/konradbartecki) on keybase.
  • I have a public key whose fingerprint is BAA1 EE52 208F CA82 AA89 1D8E 549C DBE7 056A 1C3E

To claim this, I am signing this object:

public class LocalizationHelper
{
public LocalizationHelper()
{
}
public static IEnumerable<string> GetLocalizedEnums<T>()
{
var enumType = typeof (T);
var enumNames = Enum.GetNames(enumType);
@konradbartecki
konradbartecki / InputScopeHelper.cs
Created October 27, 2015 09:47
InputScope helper for Windows and Windows Phone 8.1 +
public static class InputScopeHelper
{
public static InputScope GetSingleScope(InputScopeNameValue myscope)
{
InputScope scope = new InputScope();
InputScopeName name = new InputScopeName();
name.NameValue = myscope;
scope.Names.Add(name);
@konradbartecki
konradbartecki / App.xaml
Last active October 26, 2015 13:30
Binding from .resw files example
<Application
(...)
<!--I have placed my resource string conventer in "Converters" folder-->
xmlns:converters="using:MyWindowsPhoneApp.Converters">
<Application.Resources>
(...)
<converters:ResourceStringConventer x:Key="ResString"/>
(...)
</Application.Resources>
</Application>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSharpMasterRace
{
class Program
{
@konradbartecki
konradbartecki / InputScopeHelper.cs
Last active October 27, 2015 09:49
Windows Phone 8.1 Helpers
public static class InputScopeHelper
{
public static InputScope GetSingleScope(InputScopeNameValue myscope)
{
InputScope scope = new InputScope();
InputScopeName name = new InputScopeName();
name.NameValue = myscope;
scope.Names.Add(name);