/mnt/c/... $ time cdk list
real 0m50.455s
user 0m12.842s
sys 0m3.273s
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 Amazon.AutoScaling.Model; | |
using Amazon.AutoScaling; | |
using Amazon.CloudWatch.Model; | |
using Amazon; | |
using Amazon.CloudWatch; | |
const string Namespace = "CWAgent"; | |
const string MetricName = "TCPv4 Connections Established"; |
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
aws --profile r1-dev sso login; aws --profile r1-dev configure export-credentials --format powershell | iex; devenv |
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.Linq; | |
using System.Data.Entity.Infrastructure; | |
using System; | |
namespace Reckon.Data.EF | |
{ | |
public static class DbChangeTrackerExtension | |
{ | |
/// <summary> | |
/// Get a summary of Tracked Changes on a DbContext.ChangeTracker |
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
parse @message "* * * * * * * * * * * * * * *" as | |
date, time, s_ip, cs_method, cs_uri_stem, cs_uri_query, s_port, cs_username, c_ip, cs_User_Agent, cs_Referer, sc_status, sc_substatus, sc_win32_status, time_taken | |
| display @timestamp,cs_method, cs_uri_stem, time_taken | |
| filter time_taken > 1000 | |
| sort @timestamp desc | |
| limit 20 |
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
namespace cs9test | |
{ | |
// @jbogard "it looks like the "immutable-by-default" behavior of C# 9 records is really only with the compact positional syntax, not with just the "record" keyword" | |
// https://twitter.com/jbogard/status/1321120266676850688 | |
/// <summary> | |
/// immutable with compact positional syntax | |
/// </summary> | |
public record Person(string FirstName, string LastName); |
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
static IReadOnlyList<int> GenerateList(int option) | |
{ | |
IEnumerable<int> F() | |
{ | |
if (option > 0) | |
yield return 1; | |
if (option > 1) | |
yield return 2; | |
if (option > 3) | |
yield return 3; |
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
steps: | |
- task: DotNetCoreCLI@2 | |
inputs: | |
command: 'custom' | |
custom: 'tool' | |
arguments: 'update dotnet-script -g' | |
displayName: 'install dotnet-script' | |
- task: CmdLine@2 | |
inputs: |
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
set @schema = 'base_sms'; | |
set @table = 'bayprofiles'; | |
-- column name list | |
select concat('`',COLUMN_NAME,'`,') as columnName from information_schema.COLUMNS where TABLE_SCHEMA=@schema and TABLE_NAME=@table; | |
/* | |
`id`, | |
`profileId`, | |
`bayWidth`, | |
`bcolumn`, |
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
-- replace: | |
-- `log` with any table | |
-- `id` with any index column on that table | |
-- 81272070 with an existing value in the index column | |
-- in connection #1 | |
START transaction; | |
select * from log where id = 81272070 FOR UPDATE; | |
select sleep(40); | |
COMMIT; |
NewerOlder