Skip to content

Instantly share code, notes, and snippets.

@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active June 2, 2024 07:47
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@sevaa
sevaa / ToUTF8.sql
Last active April 30, 2024 09:51
Converting an NVARCHAR string to a UTF-8 VARBINARY data block in pure Transact-SQL
create function [dbo].[ToUTF8](@s nvarchar(max))
returns varbinary(max)
as
begin
declare @i int = 1, @n int = datalength(@s)/2, @r varbinary(max) = 0x, @c int, @c2 int, @d varbinary(4)
while @i <= @n
begin
set @c = unicode(substring(@s, @i, 1))
if (@c & 0xFC00) = 0xD800
begin
@jcouture100
jcouture100 / MsSqlRecipe.cs
Last active September 13, 2023 12:30
ScintillaNET MSSQL Recipe
// Reset the styles
scintilla.StyleResetDefault();
scintilla.Styles[Style.Default].Font = "Courier New";
scintilla.Styles[Style.Default].Size = 10;
scintilla.StyleClearAll();
// Set the SQL Lexer
scintilla.Lexer = Lexer.Sql;
// Show line numbers