Skip to content

Instantly share code, notes, and snippets.

View antony-scott's full-sized avatar

Antony Scott antony-scott

View GitHub Profile
@antony-scott
antony-scott / karabiner.json
Created February 26, 2025 08:42
Common Windows to MacOS keyboard shortcuts
{
"profiles": [
{
"complex_modifications": {
"rules": [
{
"description": "Ctrl-A -> Select All",
"manipulators": [
{
"from": {
@antony-scott
antony-scott / hashing.ts
Created April 18, 2024 15:46
Hashing using Crypto.subtle.digest
const encoder = new TextEncoder();
// BITWISE OPERATIONS
const HexDigits = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];
function toHexString_BitwiseOperations(arrayBuffer: ArrayBuffer) {
const buffer = new Uint8Array(arrayBuffer);
const result = [];
for (let i=0; i<buffer.length; ++i) {
@antony-scott
antony-scott / Proxy.cs
Created February 10, 2021 10:17
Create Proxy classes for Interfaces (properties only)
public static class Proxy
{
private static PropertyInfo[] GetProperties(Type type)
{
var list = type.GetProperties().ToList();
foreach (var intaface in type.GetInterfaces())
{
list.AddRange(GetProperties(intaface));
}