Skip to content

Instantly share code, notes, and snippets.

@pakonda
pakonda / sslscan.py
Created June 4, 2020 06:50 — forked from brandond/sslscan.py
Stupid simple Python SSL certificate chain scanner
#!/usr/bin/env python
from __future__ import print_function
import sys
import socket
import requests
import datetime
from OpenSSL import SSL, crypto
@eladb
eladb / cdk8s-eks.ts
Created March 10, 2020 13:28
cdk8s + EKS = ❤️
import * as eks from '@aws-cdk/aws-eks';
import * as iam from '@aws-cdk/aws-iam';
import * as cdk8s from 'cdk8s';
import { Construct, Stack, StackProps } from '@aws-cdk/core';
import * as k8s from '../imports/k8s';
export class TestClusterStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
@lumjjb
lumjjb / SkoepeoEncryption.md
Last active November 30, 2023 20:51
Skopeo example usage with encrypted image and functional exploration

Bunch of manual tests

Basic pull image and set up local registry

$ ./skopeo copy docker://docker.io/library/nginx:latest oci:nginx_local
Getting image source signatures
Copying blob 000eee12ec04 done
Copying blob eb22865337de done
Copying blob bee5d581ef8b done
Copying config 5eb6083c55 done
@cmendible
cmendible / kubectl_ubuntu_wsl.sh
Created November 16, 2019 22:02
Install kubectl on ubuntu (WSL) and use kubectl config from Windows
#!/bin/bash
# Receives your Windows username as only parameter.
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
windowsUser=$1
@burke
burke / 0-README.md
Last active May 1, 2023 14:14
Code Release for NixCon 2019

The rest of these files are the code referenced in my NixCon 2019 talk which live in Shopify's non-public codebases. Everything in this gist is extracted with minimal or no change from our codebase, and thus some of it references libraries or other code not included here. cli-ui and cli-kit probably comprise a majority of these cases.

All code Copyright Shopify, 2019, released here under MIT License.

@cerebrate
cerebrate / README.md
Last active February 6, 2025 00:37
Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

WARNING

THIS GIST IS EXTREMELY OBSOLETE. DO NOT FOLLOW THESE INSTRUCTIONS. SERIOUSLY.

IF YOU IGNORE THE ABOVE WARNING, YOU AGREE IN ADVANCE THAT YOU DIDN'T GET THESE INSTRUCTIONS FROM ME, THAT I WARNED YOU, AND THAT I RESERVE THE RIGHT TO POINT AND LAUGH MOCKINGLY IF AND WHEN SOMETHING BREAKS HORRIBLY.

I'll do a write-up of current custom-kernel procedures over on Random Bytes ( https://randombytes.substack.com/ ) one day soon.

NOTE

@kshcherban
kshcherban / Dockerfile
Created April 2, 2019 22:13
jenkins casc example
FROM jenkins/jenkins:2.150.3
# Install plugins
RUN /usr/local/bin/install-plugins.sh \
git:3.9.1 \
git-client:2.7.3 \
amazon-ecs:1.19 \
job-dsl:1.69 \
configuration-as-code:1.7 \
configuration-as-code-support:1.7 \
@artizirk
artizirk / gnupg_scdaemon.md
Last active April 22, 2025 18:10
OpenPGP SSH access with Yubikey and GnuPG

NB: This document describles a 'Old-School' way of using Yubikey with SSH

Modern OpenSSH has native support for FIDO Authentication. Its much simpler and should also be more stable with less moving parts. OpenSSH also now has support for signing arbitary files witch can be used as replacement of gnupg. Git also supports signing commits/tags with ssh keys.

Pros of FIDO

  • Simpler stack / less moving parts
  • Works directly with ssh, ssh-add and ssh-keygen on most computers
  • Simpler
  • Private key can never leave the FIDO device

Cons of FIDO

@syntaqx
syntaqx / cloud-init.yaml
Last active April 21, 2025 10:14
cloud init / cloud config to install Docker on Ubuntu
#cloud-config
# Option 1 - Full installation using cURL
package_update: true
package_upgrade: true
groups:
- docker
system_info:
@paulkernstock
paulkernstock / literal_string.py
Last active June 19, 2023 16:08
Literal block scalars with PyYAML's dump
import yaml
from yaml.representer import SafeRepresenter
class LiteralString(str):
pass
def change_style(style, representer):
def new_representer(dumper, data):
scalar = representer(dumper, data)