Skip to content

Instantly share code, notes, and snippets.

View RichardSlater's full-sized avatar
🏠
Working from home

Richard Slater RichardSlater

🏠
Working from home
View GitHub Profile
@RichardSlater
RichardSlater / gpg-public-key.asc
Last active July 26, 2024 19:25
GPG / PGP Keys
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGBplmMBEAC4/lTwUbkk6KB7sC9AoY5OPu8dgInZig58EPHjviENNVr8do+Q
n0slQp6Fp3C6Mj6gyVtfaWVxb9ZE9aTMPf8Kg/bxSHCYKYYLa/ZAerbYQjWW/esa
fsYIps46jHbj4HDIqtSwE9Qg+g3CcOAifos2v0Kqpu/Lwt9VXxwH1J5GMiGJHjf3
vnfZDBq1yRhxOs4pEvPJgfyw1OUFtFGhh1AMwtd+36SxzC0Jv0LdXzEAkwcmJVMC
UeyZU98pZWjlIDndr9rYiuHF5DASwObD9GDf1hNP5y/bw3PmIUmdh09c+IfsYeyv
YklZ5HCUsN20oqKKxTgD7ZVnlq7ZyMG1HbleqVyk6OrGyCG/X1wjZFe1cCOvNZKS
+qFzzZFnHTPCkOqbC3IskcA7IfALhHCeKjZE7niXjZ8Nm/e7kFmCT1bdd2VZiZ8B
5SGz+4zu9Ohiguu6SF+R65zc3hmGdWggQE3y/ySlEvpPZ9rJ9yB5E0eZ7J/grpoF
@RichardSlater
RichardSlater / WharfKitTransactions.ts
Created November 7, 2023 19:02
Using WharfKit in React /w Typescript
"use client"
import styles from './page.module.css'
import { useCallback, useEffect } from 'react';
import React from 'react'
import WalletButton from './components/WalletButton';
import { SessionKit, Session } from "@wharfkit/session"
import { WebRenderer } from "@wharfkit/web-renderer"

Linking my account richardslater on GitHub with my address 0x0860f22da6ba75627ddad10ad198ffb215a8fe76 on EVM in mycryptoprofile.io, and the challenge code is: dda32788572262c2df8133ca19e79e9a. #LitentryVerifyMyAddress

@RichardSlater
RichardSlater / connect-to-gdrive.py
Created March 26, 2022 20:08
Medium.com: Creating AI Art? Has your Super-SloMo model stopped working?
from google.colab import drive
drive.mount('/content/drive')
@RichardSlater
RichardSlater / format.ps1
Created March 4, 2022 13:01
Format CSV as IP Address List for qBittorrent (p2p)
Function Format-IP ($ip) {
$octets = $ip.Split(".") | Select-Object @{label="Octet";expression={ [Int32]::Parse($_).ToString("000") }}
return [String]::Join(".", $octets.Octet)
}
$ips = Import-Csv .\ru.csv | Select-Object -Property Start, End, Notes
$output = $ips | Select-Object @{label="Start";expression={ Format-IP $_.Start }}, @{label="End";expression={ Format-IP $_.End }}, notes
$output | ForEach-Object { "{0} - {1} , 000 , {2}" -f $_.Start, $_.End, $_.Notes }
@RichardSlater
RichardSlater / day1.cs
Last active December 3, 2021 16:00
Advent of Code 2021
var depths = File.ReadAllLines(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "input.txt")).Select(x => Int32.Parse(x));
// part 1
depths
.Skip(1)
.Zip(depths, (curr, prev) => curr > prev)
.Count(x => x == true)
.Dump("Part 1: Depths larger than previous depth");
// part 2
@RichardSlater
RichardSlater / step1.ps1
Last active October 12, 2020 19:49
Install SSH Client on Windows 10
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
@RichardSlater
RichardSlater / index.html
Created September 20, 2018 16:42
Auto-update LucidCharts
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Go-Live Plan</title>
<meta name="description" content="Go-live Plan">
<meta name="author" content="Richard Slater">
<meta http-equiv="refresh" content="3000">
@RichardSlater
RichardSlater / Test-Redirects.ps1
Created March 16, 2018 15:10
Redirect Testing Script
function Test-Url($Target) {
$result = $null;
try {
$result = Invoke-Webrequest -Uri $Target -MaximumRedirection 0 -UseBasicParsing -ErrorAction SilentlyContinue
} catch {}
return $result | `
Select-Object @{name='Result';expression={$mark}}, `
@{name='Target';expression={$Target}}, `
StatusCode, `
@{name='Redirect';expression={if (($_.StatusCode -gt 300) -And ($_.StatusCode -lt 399)) { $result.Headers["Location"] } else { $null }}}

Keybase proof

I hereby claim:

  • I am richardslater on github.
  • I am richardslater (https://keybase.io/richardslater) on keybase.
  • I have a public key ASB4g0VO17PTCu6I51OBo5Jy2TZh_LksBGxKZlNXndD2UQo

To claim this, I am signing this object: