Skip to content

Instantly share code, notes, and snippets.

@brainv
brainv / .htaccess
Created December 6, 2019 22:45 — forked from lynt-smitka/.htaccess
Block hidden files except .well-known - Apache .htaccess + Nginx
RewriteRule "(^|/)\.(?!well-known\/)" - [F]
@lynt-smitka
lynt-smitka / .htaccess
Last active January 27, 2024 05:56
Block hidden files except .well-known - Apache .htaccess + Nginx
RewriteRule "(^|/)\.(?!well-known\/)" - [F]
@pantsel
pantsel / docker-compose.yml
Last active March 21, 2024 20:25
example docker-compose.yml for kong, postgres and konga
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong

Keybase proof

I hereby claim:

  • I am aunyks on github.
  • I am aunyks (https://keybase.io/aunyks) on keybase.
  • I have a public key ASAWNctls7QnuFFYVuFN75adE6m5sj8EFb5B0OfVMb2Fngo

To claim this, I am signing this object:

@kubaceg
kubaceg / Dockerfile
Created May 4, 2017 07:30
Docker install ioncube extension (php 5.6)
RUN curl -o ioncube.tar.gz http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
&& tar -xvvzf ioncube.tar.gz \
&& mv ioncube/ioncube_loader_lin_5.6.so `php-config --extension-dir` \
&& rm -Rf ioncube.tar.gz ioncube \
&& docker-php-ext-enable ioncube_loader_lin_5.6
@brainv
brainv / web-servers.md
Created January 9, 2017 03:57 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jmcd
jmcd / KeyExchange.swift
Last active April 8, 2022 17:37
Diffie–Hellman key exchange simple implementation
import Foundation
protocol Cipher {
func encrypt(message: String, secret: Int) -> String
func decrypt(message: String, secret: Int) -> String
}
struct XOR: Cipher {
private func impl(message: String, secret: Int) -> String? {
@kainam00
kainam00 / slowserver.py
Created November 4, 2016 18:36
A simple HTTP server designed to be slow. Useful for testing LB timeouts and such.
#!/usr/bin/env python
# Includes
import getopt
import sys
import os.path
import subprocess
import BaseHTTPServer
import SocketServer
import time
@lokhman
lokhman / ubuntu-hardening.md
Last active April 23, 2024 09:05
List of things for hardening Ubuntu

WARNING

May contain out of date information. Check the comments below!

The list of actions listed below was taken mostly from Book Of Zeus with minor modifications and did the job well for Ubuntu version, which was available at that moment (May 2016). This gist was created for internal use and was never meant to be discovered by the web, although Google managed to find and index this page, which was a great surprise for me. Please check the original source for the updated information (links are provided in most of the sections), and read the comments below: they provide more details about the usage experience.

System Updates

http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/

Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.