Skip to content

Instantly share code, notes, and snippets.

View spacelatte's full-sized avatar
🤔
0x727E3A21F2

Mert Akengin spacelatte

🤔
0x727E3A21F2
View GitHub Profile
@ebal
ebal / cloud-init.sh
Created November 18, 2018 10:10
Cloud-init example using a Generic Cloud CentOS-7 on a libvirtd qmu/kvm lab
#!/bin/sh
if [ "$EUID" -ne 0 ]; then
echo -e "\nPlease run as root\neg. sudo $0 \n"
exit
fi
GITHUB_USERNAME="ebal"
cd `mktemp -d`
@burakbozyigit
burakbozyigit / tmux-cheatsheet.markdown
Created November 5, 2018 12:38 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@spacelatte
spacelatte / kanka.sh
Last active September 26, 2021 18:04
kanka: single-script package manager for #macos (#osx) with dependency resolution, based on #homebrew #brew.sh #api
#!/usr/bin/env bash
# -d 9 -type d
# -d 6 -type d
# -d 3 -type d
export APPS="${HOME}/.local/apps"
export PATH="${APPS}:${PATH}"
export JQ_URL="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-osx-amd64"
export JQ_PATH="${APPS}/jq-osx-amd64"
minikube stop; minikube delete &&
docker stop $(docker ps -aq) &&
rm -rf ~/.kube ~/.minikube &&
sudo rm -rf /usr/local/bin/localkube /usr/local/bin/minikube &&
launchctl stop '*kubelet*.mount' &&
launchctl stop localkube.service &&
launchctl disable localkube.service &&
sudo rm -rf /etc/kubernetes/ &&
docker system prune -af --volumes
@sethvargo
sethvargo / create-certs.sh
Created June 6, 2018 16:20
Use openssl to create an x509 self-signed certificate authority (CA), certificate signing request (CSR), and resulting private key with IP SAN and DNS SAN
# Define where to store the generated certs and metadata.
DIR="$(pwd)/tls"
# Optional: Ensure the target directory exists and is empty.
rm -rf "${DIR}"
mkdir -p "${DIR}"
# Create the openssl configuration file. This is used for both generating
# the certificate as well as for specifying the extensions. It aims in favor
# of automation, so the DN is encoding and not prompted.
@nadavrot
nadavrot / Matrix.md
Last active May 19, 2025 10:19
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@seanhandley
seanhandley / docker-compose.yml
Last active January 23, 2025 09:49
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@emresaglam
emresaglam / install_ss.yaml
Last active December 5, 2020 15:36
Somewhat smart automation script to install shadowsocks on major cloud providers (AWS, DigitalOcean, etc...)
#cloud-config
# Write a skeleton config file to be replaced by a random password
# Skeleton config file is:
#{
# "server_port":8000,
# "local_port":1080,
# "password":"__PASSWORD__",
# "timeout":600,
# "method":"chacha20"
@jnaulty
jnaulty / virt-install-centos
Created March 18, 2018 00:36 — forked from giovtorres/virt-install-centos
Install CentOS cloud images on KVM using cloud-init
#!/bin/bash
## **Updates to this file are now at https://github.com/giovtorres/kvm-install-vm.**
## **This updated version has more options and less hardcoded variables.**
# Take one argument from the commandline: VM name
if ! [ $# -eq 1 ]; then
echo "Usage: $0 <node-name>"
exit 1
fi
@itdaniher
itdaniher / null
Created March 16, 2018 00:47
got root
PID USER TIME COMMAND
1 root 0:01 init [5]
2 root 0:00 [kthreadd]
3 root 0:00 [ksoftirqd/0]
4 root 0:00 [kworker/0:0]
5 root 0:00 [kworker/u:0]
6 root 0:00 [khelper]
7 root 0:00 [netns]
8 root 0:00 [sync_supers]
9 root 0:00 [bdi-default]