Skip to content

Instantly share code, notes, and snippets.

View Semo's full-sized avatar
🤓
doing research

Sebastian Morkisch Semo

🤓
doing research
View GitHub Profile
@hermanbanken
hermanbanken / Dockerfile
Last active April 22, 2024 10:53
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@ramboldio
ramboldio / runCertbot.sh
Last active September 9, 2021 16:16
Run Certbot in Docker
#!/bin/bash
# this folder needs to exist
mkdir ~/certs
# authenticate yourself (requires that nothing runs on ports 443 and 80)
docker run --rm -it -v ~/certs:/etc/letsencrypt -p 443:443 certbot/certbot certonly --authenticator standalone
# renewal
docker run --rm -it -v ~/certs:/etc/letsencrypt certbot/certbot renew

Kafka installation with systemd

0. Create kafka user

sudo adduser kafka
sudo adduser kafka sudo
su -l kafka

1. Download and Install kafka archive

@bittner
bittner / 60-jetbrains.conf
Created September 25, 2015 07:57
Inotify configuration for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). Create this file with e.g. `sudo vim /etc/sysctl.d/60-jetbrains.conf`
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm).
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and
# run `sudo service procps start` or reboot.
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
#
# More information resources:
# -$ man inotify # manpage
# -$ man sysctl.conf # manpage
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@davidtimmerman
davidtimmerman / RestProxyTemplate.java
Last active February 13, 2024 08:33
Spring RestTemplate with proxy settings
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import javax.annotation.PostConstruct;
@niksumeiko
niksumeiko / git.migrate
Last active April 30, 2024 12:54
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@Webastronaut
Webastronaut / module-pattern
Last active February 16, 2024 11:20
Module pattern
var myNamespace = myNamespace || {};
myNamespace.myFancyModule = (function() {
var public = {},
private = {};
private.concatString = function(str) {
return 'Hello ' + str;
};
@niccokunzmann
niccokunzmann / hanging_threads.py
Last active September 27, 2023 08:13
This module prints all hanging threads that are dead locked. It is for Python 2 and 3. Installable: https://pypi.python.org/pypi/hanging_threads
## The MIT License (MIT)
## ---------------------
##
## Copyright (C) 2014 Nicco Kunzmann
##
## https://gist.github.com/niccokunzmann/6038331
##
## Permission is hereby granted, free of charge, to any person obtaining
## a copy of this software and associated documentation files (the "Software"),