- Start:
surreal start --log debug --user root --pass root memory surreal sql --conn http://localhost:8000 --user root --pass root --ns test --db test --pretty
/* | |
Credit: https://social.technet.microsoft.com/wiki/contents/articles/2321.script-to-create-or-drop-all-primary-keys.aspx | |
*/ | |
DECLARE @object_id int; | |
DECLARE @parent_object_id int; | |
DECLARE @TSQL NVARCHAR(4000); | |
DECLARE @COLUMN_NAME SYSNAME; | |
DECLARE @is_descending_key bit; | |
DECLARE @col1 BIT; |
sudo apt install build-essential # Install pre-reqs
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
internal static class FormsAuthenticationTicketHelper | |
{ | |
private const byte CURRENT_TICKET_SERIALIZED_VERSION = 0x01; | |
private const int MAX_TICKET_LENGTH = 4096; | |
// Resurrects a FormsAuthenticationTicket from its serialized blob representation. | |
// The input blob must be unsigned and unencrypted. This function returns null if | |
// the serialized ticket format is invalid. The caller must also verify that the | |
// ticket is still valid, as this method doesn't check expiration. |
using System.IO.Pipelines; | |
using System.Net; | |
using System.Net.Security; | |
using Microsoft.AspNetCore.Connections; | |
using Microsoft.AspNetCore.Connections.Features; | |
using Microsoft.AspNetCore.Http.Features; | |
using Microsoft.AspNetCore.Server.Kestrel.Core; | |
var builder = WebApplication.CreateBuilder(args); |
By default, Docker Desktop for Window will create 2 distros below
Credit: https://stackoverflow.com/questions/18115411/how-to-merge-specific-files-from-git-branches
When content is in file.py
from branch2 that is no longer applies to branch1, it requires picking some changes and leaving others. For full control do an interactive merge using the --patch
switch:
$ git checkout --patch branch2 file.py
public static List<T> Query<T>(this DataContext db, string sql, object param = null, int? commandTimeout = null, IDbTransaction transaction = null, [CallerFilePath]string fromFile = null, [CallerLineNumber]int onLine = 0, string comment = null) | |
{ | |
using (db.Connection.EnsureOpen()) | |
{ | |
try | |
{ | |
return db.Connection.Query<T>(MarkSqlString(sql, fromFile, onLine, comment), param, transaction ?? db.Transaction, true, commandTimeout).AsDapperList(); | |
} | |
catch (SqlException ex) when (ex.Is(SqlErrorCode.DatabaseReadOnly_3906)) | |
{ |
Docker Desktop for Windows uses WSL to manage all your images and container files and keeps them in a private virtual hard drive (VHDX) called ext4.vhdx.
It's usually in C:\Users\YOURNAME\AppData\Local\Docker\wsl\data
and you can often reclaim some of the space if you've cleaned up (pruned your images, etc) with Optimize-Vhd under an administrator PowerShell shell/prompt.
You'll need to stop Docker Desktop by right clicking on its tray icon and choosing Quit Docker Desktop. Once it's stopped, you'll want to stop all running WSL2 instances with wsl --shutdown
Mine was 47gigs as I use Docker A LOT so when I optimize it from admin PowerShell from the wsl\data folder
Invoke-WebRequest -URI https://www.educative.io/