This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace DaprKafkaDemo.Shared; | |
public class ConfluentKafkaOptions | |
{ | |
public const string ConfluentKafka = "ConfluentKafka"; | |
public SchemaRegistry SchemaRegistry { get; set; } = new SchemaRegistry(); | |
} | |
public class SchemaRegistry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let result = is_palindrome("racecar"); // Should be true | |
println!("{}", result); | |
} | |
fn is_palindrome(name: &str) -> bool { | |
let half = name.len() / 2; | |
name | |
.bytes() | |
.take(half) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using static System.Text.Encoding; | |
public static class Program { | |
public static void Main() | |
{ | |
var result = IsPalindrome("racecar"); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public static class Program | |
{ | |
public static void Main() | |
{ | |
var word = "tenet"; | |
var result = IsPalindrome(word); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<Target Name="InternalsVisibleToTask" BeforeTargets="GenerateAdditionalSources" Condition="@(InternalsVisibleTo) != ''"> | |
<ItemGroup> | |
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo"> | |
<_Parameter1>%(InternalsVisibleTo.Identity)</_Parameter1> | |
</AssemblyAttribute> | |
</ItemGroup> | |
</Target> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prompt_kubectl() { | |
local current_context=$(kubectl config current-context 2> /dev/null) | |
if [[ $current_context ]]; then | |
"⚙️ $current_context" | |
fi | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get the current branch | |
function get_branch { | |
value=$(cd $current_path; git rev-parse --abbrev-ref HEAD) | |
echo $value | |
} | |
# # Determine if we are in a git repo | |
# function is_git_repo { | |
# if [ -d $current_path/.git ]; then | |
# return 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Tools.Internal | |
{ | |
internal static class Ensure | |
{ | |
public static T NotNull<T>(T obj, string paramName) | |
where T : class | |
{ | |
if (obj is null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
<Title>A Fact</Title> | |
<Shortcut>afact</Shortcut> | |
<Description>Code snippet for an async xUnit fact</Description> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Remove-AllGitBranches { | |
,@(git branch | Select-String -Pattern "((\*\s)?master|main)|(\*\s).+" -NotMatch) | ForEach-Object{$_.Line.Trim()} | ForEach-Object{git branch -D $_} | |
} |
NewerOlder