Skip to content

Instantly share code, notes, and snippets.

@soarez
soarez / ca.md
Last active April 15, 2024 12:20
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@nateware
nateware / gist:3915757
Created October 19, 2012 01:27
Start Mac VNC server from command line
# Step 1: Set priveleges
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
Starting...
Setting allow all users to YES.
Setting all users privileges to 1073742079.
Done.
# Step 2: Allow VNC clients
@vsouza
vsouza / .bashrc
Last active April 9, 2024 05:27
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
#!/usr/bin/env python3
from struct import unpack
from bcc import BPF
from socket import if_indextoname
C_BPF_KPROBE = """
#include <net/sock.h>
@robskillington
robskillington / prometheus.proto
Last active February 15, 2024 22:23
Example Python Prometheus remote write client
// Copyright 2016 Prometheus Team
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@samczsun
samczsun / README.md
Last active February 1, 2024 20:34
SEAL 911 Members

This document has been moved!

#!/bin/sh
# this script allow you run a container attached to node with root privilege
# see https://securek8s.dev/exercise/65-privileged/
# usage:
# kubectl get nodes
# ./k8s_attach_node.sh <node name>
node=${1}
if [ -n "${node}" ]; then