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
: Backup "Elden Ring" save game folder to a specified location. | |
: Requires 7zip. | |
@echo off | |
set sevenZipExe=D:\Program Files\7-Zip\7z.exe | |
set erPath=%appdata%\EldenRing | |
set backupPath=D:\Users\gglas\Downloads\backup | |
set cwd=%cd% |
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
: Backup "Pool of Radiance" and "GBC" (Gold Box Companion) root folders | |
: to a specified location. | |
: Requires 7zip. | |
@echo off | |
set sevenZipExe=D:\Program Files\7-Zip\7z.exe | |
set porPath=D:\Program Files (x86)\GOG Galaxy\Games\Pool of Radiance | |
set gbcPath=D:\Program Files (x86)\GBC | |
set backupPath=D:\Users\gglas\Downloads\backup |
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
#include "win32_net.h" | |
#include <windows.h> | |
#include <wininet.h> | |
#pragma comment (lib, "Wininet.lib") | |
#include <stdio.h> | |
#include <wchar.h> | |
#include <cwctype> | |
#include <algorithm> |
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 Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
namespace CommonLib | |
{ | |
public class JsonHelper | |
{ | |
/* | |
string json = JsonHelper.MergeJson(null, @"{ | |
'FirstName': 'John', |
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.Text; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.DependencyInjection; | |
namespace Common | |
{ | |
public static class Services | |
{ |
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
window.spAjax = (function () { | |
var that = {}; | |
that.send = function (url, options) { | |
var onSuccess = options.onSuccess || function () { }, | |
onError = options.onError || function () { }, | |
onComplete = options.onComplete || function () { }, | |
cache = options.cache || false; | |
if (!cache) |
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
-- get plan_handle(s) | |
SELECT plan_handle, st.text | |
FROM sys.dm_exec_cached_plans | |
CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS st | |
where text like N'%#raw_searches_to_process%' | |
-- then pass plan_handle to: | |
DBCC FREEPROCCACHE (0x05000600AD74597D10E736078B02000001000000000000000000000000000000000000000000000000000000); | |
GO | |
DBCC FREEPROCCACHE (0x0600060066FD5913009C389C8C02000001000000000000000000000000000000000000000000000000000000); |
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
/* | |
Need to delete certain rows out of raw_event table. | |
but raw_event table is partitioned by timestamp and contains a ton of data, | |
so need to do chunked deletes by small intervals of the partition key (timestamp) | |
Will try 1 min intervals. | |
*/ | |
set nocount on; | |
set transaction isolation level read uncommitted; |
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 nocount on; | |
set transaction isolation level read uncommitted; | |
DECLARE @rows_processed INT = 0 | |
DECLARE @row_count INT = 0 | |
DECLARE @max_rows bigint = 1000 | |
-- get bounds | |
declare @min_id bigint | |
select @min_id = min(upload_raw_event_id) from raw_data..upload_raw_event (nolock) where event_name = 'update-regex-hit' |