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
#! /bin/bash | |
# NB the result will need cleaned | |
# ADVICE run this from another directory and edit the pathing | |
git ls-files --others --exclude-standard --directory ./YOUR/PATH > .gitignore |
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.Reflection.Emit; | |
using System.Reflection; | |
internal static class TypeMaker | |
{ | |
private const string AssemblyNameForType = "DynamicAssemblyExample"; | |
public static Type? Make(string typeName) | |
{ |
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
#!/bin/bash | |
script -q -c "git --no-pager log --decorate --graph --format='%C(auto,#aa5500) %h %C(auto,#55ff55) (%an %GK %G?) %Creset %s %cr %C(auto,#ffff55) %d' --date=relative --all --remotes=* -n 100" ../graph.txt && \ | |
ansi2html < ../graph.txt > ../graph.html |
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
#! /bin/bash | |
# checkout-pull-prune.sh | |
branchName=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p') | |
git fetch origin "$branchName:$branchName" | |
git merge "$branchName" |
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
#! /bin/bash | |
branchName=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p') | |
git checkout "$branchName" \ | |
| git branch --merged \ | |
| grep -E --invert-match "(^\*|master|main|dev)" \ | |
| xargs git branch --delete \ | |
&& git remote prune origin |
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
#! /bin/bash | |
# checkout-pull-prune.sh | |
branchName=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p') | |
git checkout "$branchName" && \ | |
git pull && \ | |
git fetch --prune |
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
public record TSDemoInput(string Name); | |
public class TSDemoInputType : InputObjectType<TSDemoInput> | |
{ | |
protected override void Configure(IInputObjectTypeDescriptor<TSDemoInput> descriptor) | |
{ | |
descriptor.Field(input => input.Name) | |
.Type<TrimmedStringType>(); | |
} | |
} |
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 Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Mvc.Infrastructure; | |
using Microsoft.Extensions.Options; | |
public class ConfigureMvcOptions : IConfigureOptions<MvcOptions> | |
{ | |
private readonly IHttpRequestStreamReaderFactory readerFactory; | |
public ConfigureMvcOptions(IHttpRequestStreamReaderFactory readerFactory) | |
{ |
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
cp /usr/local/etc/dnsmasq.conf /usr/local/etc/dnsmasq.conf.orig | |
echo "conf-dir=/usr/local/etc/dnsmasq.d/,*.conf" | tee /usr/local/etc/dnsmasq.conf |
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
public static string GetBot(string message) | |
{ | |
string bot = $"\n {message}"; | |
bot += @" | |
__________________ | |
\ | |
\ | |
.... | |
....' | |
.... |