Skip to content

Instantly share code, notes, and snippets.

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 16, 2024 09:00
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@nilesh-akhade
nilesh-akhade / OWASP_Kuberneres.md
Created September 13, 2022 10:10
Attempt to map OWASP Top10 security risks with Aqua's Trivy Scanner

OWASP to Trivy Checks Mapping

  • OWASP#1 Insecure Workload Configurations

    • Trivy checks - KSV001, KSV014, KSV017
  • OWASP#2 Supply Chain Vulnerabilities

    • Manual - Image Integrity
    • Manual - SBOM
    • Manual - Image Signing
  • Manual - Image Composition

@maratori
maratori / .golangci.yml
Last active April 16, 2024 08:56
Golden config for golangci-lint
# This code is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021 Marat Reymers
## Golden config for golangci-lint v1.57.2
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt and change it for your needs.
run:
@imba-tjd
imba-tjd / .Cloud.md
Last active April 16, 2024 08:56
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

@Sharpie
Sharpie / README.md
Last active April 16, 2024 08:56
Metric Scraping Scripts

This gist contains various scripts for scraping metrics. Mostly useful for processing the contents of Puppet Enterprise support bundles:

  • sar2influx.rb: A Ruby script that uses sadf to turn SAR archives into InfluxDB line format. For best results, run from a Linux VM using a recent operating system. Such as Ubuntu 22.04.
  • pdb2influx.sh: A bash script that uses awk and mlr to extract command processing times from puppetdb.log files.
  • top-api-calls.sh: Extracts the 10 most popular API calls from *-access.log along with their median and max duration grouped into 30 minute periods (Puppet $runinterval). Uses awk and mlr.
@mjkstra
mjkstra / arch_linux_installation_guide.md
Last active April 16, 2024 08:54
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
@bikrone
bikrone / config.lua
Last active April 16, 2024 08:54
config.lua for lvim
--[[ lvim is the global options object Linters should be filled in as strings with either a global executable or a path to an executable
]]
-- require('swenv.api').get_current_venv()
-- general
lvim.log.level = "warn"
lvim.format_on_save.enabled = true
lvim.builtin.theme.name = "tokyonight"
lvim.colorscheme = "onedark"
lvim.builtin.terminal.size = 15
@rampageX
rampageX / block_bittorrent.sh
Created November 5, 2019 18:47
iptables block bittorrent
# Block Torrent algo string using Boyer-Moore (bm)
iptables -A FORWARD -m string --algo bm --string "BitTorrent" -j DROP
iptables -A FORWARD -m string --algo bm --string "BitTorrent protocol" -j DROP
iptables -A FORWARD -m string --algo bm --string "peer_id=" -j DROP
iptables -A FORWARD -m string --algo bm --string ".torrent" -j DROP
iptables -A FORWARD -m string --algo bm --string "announce.php?passkey=" -j DROP
iptables -A FORWARD -m string --algo bm --string "torrent" -j DROP
iptables -A FORWARD -m string --algo bm --string "announce" -j DROP
iptables -A FORWARD -m string --algo bm --string "info_hash" -j DROP
iptables -A FORWARD -m string --algo bm --string "/default.ida?" -j DROP
@veryeasily
veryeasily / list_all_bindkey_mappings.sh
Created November 19, 2021 06:23
[Zsh Snippets] #Zsh #Shell
#!/usr/bin/env zsh
# List all bindkey mappings
#
# @see https://neg-serg.github.io/2017/03/zargs-howto/
autoload -U zargs
zargs -i{} $(bindkey -l) -- bindkey -L -M {}
@luluco250
luluco250 / MouseRaw.cpp
Last active April 16, 2024 08:51
Getting raw mouse input with the native Windows API
/*
Example of how to get raw mouse input data using the native Windows API
through a "message-only" window that outputs to an allocated console window.
Not prepared for Unicode.
I don't recommend copy/pasting this, understand it before integrating it.
*/
// Make Windows.h slightly less of a headache.
#define NOMINMAX