Skip to content

Instantly share code, notes, and snippets.

View jloehel's full-sized avatar
🏡
🇺🇦 Working from home

Jürgen Löhel jloehel

🏡
🇺🇦 Working from home
View GitHub Profile
@chancez
chancez / example.tf
Last active November 20, 2023 21:56
Support creating a DNS validated ACM certificate containing SANs for multiple different hosted zones
module "combined_acm_certificate" {
source = "../../modules/acm_certificate_dns_validated_multi_zone"
domain_name = "infra.example.com"
zone_to_san = {
"infra.example.com" = [
"*.infra.example.com",
"*.dev.infra.example.com",
"*.staging.infra.example.com",
"*.production.infra.example.com",
@adwait1-g
adwait1-g / running_the_kernel.md
Last active July 8, 2024 19:37
This gist tells you how to build the kernel and run it on qemu. This is also a way to get started with kernel's internals.

1. Downloading and building the Linux kernel

  1. Clone the github repository onto your local machine.
$ git clone https://github.com/torvalds/linux.git
$ cd linux
  1. Configure the build
@ekreutz
ekreutz / ansible_variable_precedence.md
Last active April 25, 2024 17:43
Ansible variable precedence (order, hierarchy)
from locust.stats import RequestStats
from locust import Locust, TaskSet, task, events
import os
import sys, getopt, argparse
from random import randint,random
import json
from locust.events import EventHook
import requests
import re
import grpc
@thekalinga
thekalinga / libre-office-uno-python-setup.md
Last active January 28, 2022 01:54
Setup python environment for writing macros with pyenv, virtualenv, visual studio code, libre office uno

Libre office python development environment setup guide

Setup

  1. Install Visual studio code
  2. Install Python plugin for visual studio
  3. Install pyenv that helps you manage multiple versions of python side by side
  4. Install pyenv-virtualenv helps you utilize python virtualenvs inside pyenv

git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv

@ljharb
ljharb / array_iteration_thoughts.md
Last active September 6, 2024 04:53
Array iteration methods summarized

Array Iteration

https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff

While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.

Intro

JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu

@subfuzion
subfuzion / Makefile.md
Last active June 11, 2024 22:07
Makefile for Go projects

Go has excellent build tools that mitigate the need for using make. For example, go install won't update the target unless it's older than the source files.

However, a Makefile can be convenient for wrapping Go commands with specific build targets that simplify usage on the command line. Since most of the targets are "phony", it's up to you to weigh the pros and cons of having a dependency on make versus using a shell script. For the simplicity of being able to specify targets that can be chained and can take advantage of make's chained targets,

global
log 127.0.0.1 local0
user root
group root
daemon
defaults
log global
mode http
option httplog
@Neo23x0
Neo23x0 / yara_performance_guidelines.md
Last active September 4, 2024 09:14
YARA Performance Guidelines

This Gist has been transfered into a Github Repo. You'll find the most recent version here.

YARA Performance Guidelines

When creating your rules for YARA keep in mind the following guidelines in order to get the best performance from them. This guide is based on ideas and recommendations by Victor M. Alvarez and WXS.

  • Revision 1.4, October 2020, applies to all YARA versions higher than 3.7
@jasoares
jasoares / mongod0.conf
Last active February 24, 2022 21:54
MongoDB config file template
systemLog:
destination: file
path: '/usr/local/var/log/mongodb/mongod0.log'
logAppend: true
storage:
dbPath: '/usr/local/var/mongodb0'
directoryPerDB: true
journal:
enabled: true
engine: wiredTiger