This file contains 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 class MyController | |
{ | |
public object Get(string id) | |
{ | |
return new { Key = id, Value = "val:" + id }; | |
} | |
} | |
class Program | |
{ | |
// Application entry-point |
This file contains 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 class Startup | |
{ | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.Configure<Applications>(options => Configuration.GetSection("Applications").Bind(options)); | |
var apps = services.BuildServiceProvider().GetService<IOptionsSnapshot<Applications>>(); | |
if (apps.Value.AppList == null || !apps.Value.AppList.Any()) | |
{ | |
var sample = new Applications(); |
This file contains 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 | |
if [ "$1" == "" ]; then | |
echo "no input file name"; | |
exit 1; | |
else | |
mp3file="$1"; | |
fi | |
This file contains 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.VisualStudio.TestTools.UnitTesting; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; |
This file contains 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
const int MaxAttempts = 5; | |
static void Main(string[] args) | |
{ | |
TestFileWriteAsync(); | |
TestFileWrite(); | |
TestFileWriteViaThread(); | |
Console.ReadLine(); | |
} | |
private static void TestFileWrite() |
This file contains 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 Newtonsoft.Json; | |
namespace jsonTimeZone | |
{ | |
//https://stackoverflow.com/questions/65436081/date-deserialization-difference-between-kestrel-on-windows-and-kestrel-on-macos | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
This file contains 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
# Shortcuts | |
alias sd="cd /mnt/sdcard" | |
alias dl="cd /mnt/sdcard/Download" | |
alias g="git" | |
alias gs="git status" | |
alias gco="git commit" | |
alias gch="git checkout" | |
alias h="history" | |
alias j="jobs" |
OlderNewer