Skip to content

Instantly share code, notes, and snippets.

View hastarin's full-sized avatar

Jon Benson hastarin

  • Champion Data
  • Melbourne, Australia
View GitHub Profile
@guitarrapc
guitarrapc / GetSSOProfileCredentials.cs
Last active April 14, 2025 16:50
Reuse AWS SSO Credential in LinqPad or Any C# code. Make sure run `aws sso login` before run code. based on https://github.com/aws/aws-sdk-net/issues/1676
var profile = "YOUR_PROFILE_NAME";
var credentials = LoadSsoCredentials(profile);
// any operation you want to do with sso credentials.
var s3client = new AmazonS3Client(credentials, RegionEndpoint.APNortheast1);
var buckets = await s3client.ListBucketsAsync();
buckets.Dump();
static AWSCredentials LoadSsoCredentials(string profileName)
{
@tsmoreland
tsmoreland / windows-git-ssh.md
Last active March 20, 2022 23:49
Git/SSH Agent use

GIT/SSH Link

Run the following to set GIT_SSH required for git to use ssh-agent thus avoiding multiple prompts for password (which is less secure so take care)

[Environment]::SetEnvironmentVariable("GIT_SSH", "$((Get-Command ssh).Source)", [System.EnvironmentVariableTarget]::User)

SSH agent automatic startup

run the following to ensure automatic startup

@mimura1133
mimura1133 / install.sh
Last active January 29, 2023 21:24
Enhanced Session for Kali Linux.
#!/bin/bash
# Original : https://raw.githubusercontent.com/Microsoft/linux-vm-tools/master/arch/install-config.sh
###############################################################################
# Update our machine to the latest code if we need to.
#
if [ "$(id -u)" -ne 0 ]; then
echo 'This script must be run with root privileges' >&2
exit 1
@Ikalou
Ikalou / git_and_unity.md
Last active July 1, 2025 16:48
Git and Unity

EDIT: this is an old post and a lof the information in this document is outdated.

Using Git with Unity

Git logo

Git is a popular free and open source distributed version control system.

I am new to Unity, but as a long time git user, I wanted to use git for my

@meinside
meinside / smartctl_test.md
Last active June 25, 2025 11:01
For checking health of usb hdd on raspberry pi with smartctl.

for testing external hdd with smartctl,

install smartmontools

$ sudo apt-get install smartmontools

start test,

@rubensayshi
rubensayshi / 0.intro
Created September 20, 2012 15:09
FML I'm losing it
Somehow this query is 5seconds the first time I run it and 0.000smtsmall seconds the 2nd time, even if do SELECT SQL_NO_CACHE
I already tried optimizing / repairing the tables, even completely dropped and recreated the database ...