Skip to content

Instantly share code, notes, and snippets.

View Enelar's full-sized avatar
💭
https://www.linkedin.com/in/offenso

Kirill Berezin Enelar

💭
https://www.linkedin.com/in/offenso
View GitHub Profile
@kekru
kekru / 01nginx-tls-sni.md
Last active April 1, 2024 02:29
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@Timothee
Timothee / _command_runner.sh
Last active September 29, 2022 00:50
This function lets you easily create series of commands into a single call # It will print each successive command, run it and, as long as it returned # with code 0, continue to the next step. # If any step fails, it will stop and let you pick it back up after you fix the # issues.
#!/usr/bin/env bash
# This function lets you easily create series of commands into a single call
# It will print each successive command, run it and, as long as it returned
# with code 0, continue to the next step.
# If any step fails, it will stop and let you pick it back up after you fix the
# issues.
#
# Example of script using this function:
# !/usr/bin/env bash
@flomotlik
flomotlik / debrief-template
Last active May 5, 2016 16:22
Codeship Debrief Template
# Service Interruption Debrief
## Brief Executive Summary
EXECUTIVE SUMMARY HERE
***On Call during outage***:
***Time outage started***:
@danielkza
danielkza / fedora-bfq.py
Last active May 2, 2017 15:23
Script to build a BFQ-patched kernel from Fedora packages
#!/usr/bin/env python2.7
from __future__ import print_function
import sys
import os.path
import re
import shutil
from glob import glob
from HTMLParser import HTMLParser
from subprocess import check_output, check_call, Popen, CalledProcessError, PIPE
@bennadel
bennadel / code-1.htm
Created March 25, 2014 11:06
Enable And Disable jQuery Event Handlers (Rather Than Bind And Unbind)
<!DOCTYPE HTML>
<html>
<head>
<title>Enable And Disable jQuery Event Handlers</title>
<style type="text/css">
#modal {
background-color: #FAFAFA ;
border: 1px solid #C0C0C0 ;
display: none ;
@Divi
Divi / compile-php-thread-safe-and-pthreads.sh
Last active May 19, 2021 00:43
Compile PHP Thread Safe & pthreads extension
#!/usr/bin/env bash
# PARAMETERS
# ----------
# PHP
# ---
PHP_TIMEZONE="UTC"
PHP_DIRECTORY="/etc/php5ts"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>semantic-slider</title>
<style>
.ui.slider.range input[type="range"] {
-webkit-appearance: none;
border-width: 1px;
@willbroderick
willbroderick / recursive_nav_helper.liquid
Last active July 4, 2021 05:37
Generic recursive nav markup generator for Shopify, works with non-latin alphabet and to any depth.
{% comment %}
Usage: {% include 'recursive-navigation-helper' with 'main-menu' %}
{% endcomment %}
{% comment %} Sanity check to prevent infinite recursion {% endcomment %}
{% assign sanity = sanity | plus: 1 %}
{% if sanity < 10000 %}
{% if linklists[recursive-navigation-helper].links.size > 0 %}
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,