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
let durationSequence = 1; | |
function TrackDuration(options?: { enabled?: boolean; excludes?: Array<string> }) { | |
return function TrackDuration(target: any, propertyKey?: string, descriptor?: PropertyDescriptor) { | |
if (options?.enabled === false) { | |
return; | |
} | |
let methods: any[]; | |
//is a method | |
if (propertyKey) { | |
methods.push(propertyKey); |
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
# Define the log file path | |
log_file="$(dirname "$0")/reboot.sh.log" | |
# Define a function to log messages with date stamps | |
log_message() { | |
local message="$1" | |
local timestamp=$(date +"%Y-%m-%d %H:%M:%S") | |
# Use tee to echo the message to both the console and the log file | |
echo "[$timestamp] $message" | tee -a "$log_file" |
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
/** | |
* Run one action at a time. Will run until all pending actions are complete. | |
*/ | |
export class ActionQueue { | |
private queueItems: Array<{ | |
action: () => Promise<any>; | |
resolve: (value: any) => void; | |
reject: (error: any) => void; | |
promise: Promise<any>; | |
}> = []; |
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
"use strict"; | |
(function (factory) { | |
if (typeof Benchmark !== "undefined") { | |
factory(Benchmark); | |
} else { | |
factory(require("benchmark")); | |
} | |
})(function (Benchmark) { | |
var suite = new Benchmark.Suite; |
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
exec dbms_output.enable(10000); | |
SET SERVEROUTPUT ON; | |
var myCursor REFCURSOR; | |
begin | |
--Schema.Package.Procedure(Parameters); | |
SCHEMA_NAME.PACKAGE_NAME.PROCEDURE_NAME(10,'',:myCursor ); | |
END; | |
/ |
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 AppConfig | |
{ | |
public string GetBaseUrl() | |
{ | |
var req = HttpContext.Current.Request; | |
return $"{req.Url.Scheme}://{req.Url.Authority}{req.ApplicationPath.TrimEnd('/')}/"; | |
} | |
} |
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
//https://stackoverflow.com/questions/46034188/add-an-operator-to-visual-studio-code-theme-in-settings-json | |
{ | |
"editor.tokenColorCustomizations": { | |
"textMateRules": [ | |
{ | |
"scope": "keyword.operator.word", | |
"settings": { | |
"foreground": "#569BD2" | |
} | |
} |
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
powershell -Command "cmdkey /list | ForEach-Object{if($_ -like '*Target:*' -and $_ -like '*'){cmdkey /del:($_ -replace ' ','' -replace 'Target:','')}}" |
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 System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
public class Timer | |
{ | |
public static List<Action> Callbacks = new List<Action>(); | |
private static bool IsRunning = false; | |
public static void Register(Action callback) |
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
ver# 2 | |
hotkeyCount# 16 | |
hotkey1# 49 1 7 1 | |
hotkey2# 50 1 7 2 | |
hotkey3# 51 1 7 3 | |
hotkey4# 52 1 7 4 | |
hotkey5# 81 1 7 5 | |
hotkey6# 87 1 7 6 | |
hotkey7# 69 1 7 7 | |
hotkey8# 82 1 7 8 |