Skip to content

Instantly share code, notes, and snippets.

@c9s
c9s / .babelrc
Last active October 21, 2023 14:04
webpack + babel + typescript + es6 - total solutions!
{
"presets": ["es2015"],
"plugins": ["transform-runtime"]
}
@dzlab
dzlab / build.sh
Last active October 28, 2025 11:55
Configure NGINX to log HTTP POST request's body
#!/bin/bash
echo "Building NGINX along with Echo module"
# install prerequisites
yum -y install gcc gcc-c++ make zlib-devel pcre-devel openssl-devel
# download the Echo module
curl -L -O 'https://github.com/openresty/echo-nginx-module/archive/v0.58.tar.gz'
tar -xzvf v0.58.tar.gz && rm v0.58.tar.gz
mv echo-nginx-module-0.58 /tmp/echo-nginx-module
@ankurk91
ankurk91 / install_lamp_ubuntu.sh
Last active August 19, 2025 06:41
Ubuntu 22/24 - PHP development (php 7.4 / 8.4, nginx)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu Server
export DEBIAN_FRONTEND=noninteractive
echo -e "\e[96m Adding PPA \e[39m"
sudo add-apt-repository -y ppa:ondrej/php
@CMCDragonkai
CMCDragonkai / regular_expression_engine_comparison.md
Last active September 26, 2025 08:50
Regular Expression Engine Comparison Chart

Regular Expression Engine Comparison Chart

Many different applications claim to support regular expressions. But what does that even mean?

Well there are lots of different regular expression engines, and they all have different feature sets and different time-space efficiencies.

The information here is just copied from: http://regular-expressions.mobi/refflavors.html

@rafaeltuelho
rafaeltuelho / openshift-cheatsheet.md
Last active September 24, 2025 12:29
My Openshift Cheatsheet

My Openshift Cheatsheet

List all non openshift/kube namespaces

requires jq CLI

oc get namespaces -o json | jq '[.items[] | select((.metadata.name | startswith("openshift") | not) and (.metadata.name | startswith("kube-") | not) and .metadata.name != "default" and (true)) | .metadata.name ]'

Project Quotes, Limits and Templates

@bergonzzi
bergonzzi / index.html
Last active July 21, 2021 13:37
DataTables + yadcf + maplace.js - load the table and the map from the same data source and update the map automatically when filtering
<html>
<head>
<title>DataTables + yadcf + Google Maps</title>
<script type="text/javascript" charset="utf8" src="http://maps.google.com/maps/api/js?libraries=geometry&v=3.22&key={YOUR_API_KEY}"></script>
<script type="text/javascript" charset="utf8" src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script type="text/javascript" charset="utf8" src="http://cdn.datatables.net/1.10.11/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.11/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" charset="utf8" src="maplace.min.js"></script>
<script type="text/javascript" charset="utf8" src="jquery.dataTables.yadcf.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
@elnappo
elnappo / logstash-suricata.conf
Last active August 4, 2025 17:30
Suricata Logstash Elasticsearch
input {
file {
path => ["/var/log/suricata/eve.json"]
sincedb_path => ["/var/lib/logstash/since.db"]
codec => json
type => "SuricataIDPS"
}
}
filter {
@szurcher
szurcher / centos7.json
Last active September 12, 2021 09:56
CentOS 7 Minimal kickstart file and Packer config.json for building a vagrant virtualbox base box with guest additions installed. Based off of https://www.centosblog.com/centos-7-minimal-kickstart-file/
{
"builders": [{
"type": "virtualbox-iso",
"guest_os_type": "RedHat_64",
"iso_url": "[YOUR ISO PATH HERE]",
"iso_checksum": "[YOUR ISO CHECKSUM HERE]",
"iso_checksum_type": "sha256",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "1500s",
@khangvm53
khangvm53 / Install-varnish-with-nginx-in-Centos-7.md
Last active March 24, 2023 04:31
Install varnish with nginx in Centos 7

Install nginx, varnish

yum install varnish
yum install nginx

Config nginx listen on port 8081

server {
        listen 8081;
        server_name www.example.com;
@thealexcons
thealexcons / jwt_golang_example.go
Last active April 16, 2023 03:04
JSON Web Tokens in Go
package main
import (
"io/ioutil"
"log"
"strings"
"net/http"
"encoding/json"
"fmt"
"time"