Skip to content

Instantly share code, notes, and snippets.

View hutchic's full-sized avatar
💭
Open for work

Colin Hutchinson hutchic

💭
Open for work
View GitHub Profile
@thomasbad
thomasbad / Ai.ipynb
Created February 25, 2023 18:06
AI.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thomasbad
thomasbad / faceswap-trainer-work.ipynb
Created February 7, 2023 08:52
faceswap-trainer-work.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?
//
// AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio)
//
// File: twitterFollowerCuratorBot.php
//
// Created: May 2021
// License: MIT
//
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@jaytaylor
jaytaylor / delete-from-v2-docker-registry.md
Last active April 19, 2024 18:12
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
#!/bin/bash
echo "Start Export Process"
echo "Log into Keybase..."
keybase login
echo "Exporting your PGP keys..."
keybase pgp export -o keybase.public.key
keybase pgp export -s -o keybase.private.key
@alirezaomidi
alirezaomidi / openconnect.sh
Last active November 28, 2023 12:04
Script to connect and disconnect to/from openconnect without pain
#!/bin/bash
# This script connects the computer to a vpn server using openconnect without pain
prog_name=$(basename $0)
# CHANGE YOUR_VPN_SERVER_DOMAIN to the VPN server you know like example.com
domain=YOUR_VPN_SERVER_DOMAIN
function help {
@jkordish
jkordish / hosts.ctmpl
Last active June 13, 2017 20:17
consul-template for generating /etc/hosts from service catalog
# consul-template generated
127.0.0.1 localhost {{with node}}{{.Node.Node}}{{end}}
{{with node}}{{.Node.Address}} {{.Node.Node}}{{end}}
::1 localhost
# hosts by service
{{range services}}}# {{.Name}}{{$Name :=.Name}}{{range $index, $service := service .Name "any" }}
{{.Address}} {{.Node}} {{$Name}}0{{$index | add 1}}
{{end}}{{end}}
@evnm
evnm / datadog-iam-stack.yml
Last active July 5, 2022 19:50
A CloudFormation template describing an IAM policy+role pair which grants cross-account read access for monitoring AWS infrastructure in Datadog
---
AWSTemplateFormatVersion: "2010-09-09"
Description: Creates a stack containing an IAM role used to grant
Datadog monitoring access to AWS infrastructures. See
http://docs.datadoghq.com/integrations/aws/#installation for
details.
Parameters:
DatadogAwsAccountId:
@vasanthk
vasanthk / System Design.md
Last active May 6, 2024 18:32
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?