Skip to content

Instantly share code, notes, and snippets.

View michaelact's full-sized avatar
🧐
Who are you?

michaelact

🧐
Who are you?
View GitHub Profile
@ii64
ii64 / main.go
Created February 16, 2022 22:00
Go ebpf tracepoint example of kmem:mm_page_alloc , syscalls:sys_enter_open, and syscalls:sys_enter_openat
//go:build linux
// +build linux
// This program demonstrates attaching an eBPF program to a kernel tracepoint.
// The eBPF program will be attached to the page allocation tracepoint and
// prints out the number of times it has been reached. The tracepoint fields
// are printed into /sys/kernel/debug/tracing/trace_pipe.
package main
import (
@kvz
kvz / prometheus-processes.sh
Created January 14, 2021 20:25
prometheus-processes.sh
#!/usr/bin/env bash
set -o pipefail
set -o errexit
set -o nounset
# set -o xtrace
newline=$'\n'
# ps %cpu is total consumption divided by total runtime, so we use
# the second iteration of top here to get a clean current value:
@kennethnwc
kennethnwc / .dockerignore
Last active July 28, 2024 08:09
My docker-compose with nextjs and nginx
.next/
node_modules/
Dockerfile
yarn-error.log
.dockerignore
.git
.gitignore

Tcpdump

Tcpdump is a commandline tool that is used to dump traffic on a network. This tool comes in hand when you want to analyse network captures within the command line. Basically it can do most of the wireshark job.

NOTE This guide might not be complete it just serve as a reference to me.

Additional Note & Reference

@npearce
npearce / install-docker.md
Last active July 30, 2024 09:24
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@miguelmota
miguelmota / notes.txt
Last active April 14, 2024 08:26
runc vs gvisor (runsc) vs rkt vs KataContainers vs NablaContainers
knowledge dump on container runtimes
KataContainers
- image coupled with kernel
- light vm layer
- can run in nested virturalization environments if hardware supports and you can enable it in bios (ex. only bare metal EC2 instances, limits many cloud providers)
- slower startup time
- OCI compliant
- previously known as ClearContainers by Intel
@dublado
dublado / gist:cf8c4fbe359c686266eb7723a0a08c55
Created March 6, 2018 14:58
Apache Bench (ab) to POST JSON to an API
$ cat test.json
json='{ "timestamp" : 1484825894873, "test" : "test"}'
ab -c 10 -n 1000 -p test.json -T application/x-www-form-urlencoded https://example.com/test
#https://prabuddha.me/apache-bench-ab-post-json-api/
@fernandoaleman
fernandoaleman / install-rabbitmq-ubuntu1604.md
Last active November 21, 2022 04:09
Install RabbitMQ on Ubuntu 16.06

Install RabbitMQ on Ubuntu 16.04

Install Erlang

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update -y
sudo apt-get install -y erlang erlang-nox
@hostilefork
hostilefork / listener.c
Last active July 19, 2024 02:55
Simple listener and sender for UDP multicast
//
// Simple listener.c program for UDP multicast
//
// Adapted from:
// http://ntrg.cs.tcd.ie/undergrad/4ba2/multicast/antony/example.html
//
// Changes:
// * Compiles for Windows as well as Linux
// * Takes the port and group on the command line
//
import path from 'path';
import webpack from 'webpack';
import merge from 'lodash.merge';
const DEBUG = !process.argv.includes('--release');
const VERBOSE = process.argv.includes('--verbose');
const WATCH = global.WATCH === undefined ? false : global.WATCH;
const AUTOPREFIXER_BROWSERS = [
'Android 2.3',
'Android >= 4',