Skip to content

Instantly share code, notes, and snippets.

View 101t's full-sized avatar
🐍
Simple is better than complex!

Tarek Kalaji 101t

🐍
Simple is better than complex!
View GitHub Profile
@gavinhungry
gavinhungry / nginx-tls.conf
Last active March 7, 2025 19:38
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <[email protected]>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are not included here.
#
# Additional tips:
#
@betrcode
betrcode / README.md
Created June 24, 2014 06:36
Using Python to check if remote port is open and accessible.
@arulrajnet
arulrajnet / MXEmailVerifier.py
Last active May 25, 2023 14:23
Verify the given mail id is valid or not, without sending mail. Verifying the email id directly from mail exchange server.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Verify the given mail id is valid or not without sending mail. Verifying the email id directly from mail exchange server.
"""
import argparse
import smtplib
import dns.resolver
@alukach
alukach / admin.py
Created January 5, 2015 04:47
Custom Django Admin Form via Fake Model
from django.contrib import admin, messages
from django.http import HttpResponseRedirect
from django.shortcuts import render
from my_app.forms import CustomForm
class FakeModel(object):
class _meta:
app_label = 'my_app' # This is the app that the form will exist under
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 9, 2025 19:51
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@ohanetz
ohanetz / install-ffmpeg-ubuntu.sh
Created August 24, 2015 19:26
This script will install ffmpeg with all its dependencies on Ubuntu 14.04 server machine
#!/bin/bash
## Preparing Environment - this can be altered to match your installation ##
# Folder to store ffmpeg and dependency libraries sources in the process:
FFMPEG_SRC=~/ffmpeg
# Folder to install ffmpeg binary into:
FFMPEG_BIN=$HOME/bin
## Install dependencies and packages that can be installed by apt-get ##
sudo apt-get update
@ankurk91
ankurk91 / github_gpg_key.md
Last active April 14, 2025 13:42
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@worldadventurer
worldadventurer / freepbx-asterisk-install-g729-g723-codec.sh
Last active May 28, 2021 04:53
FreePBX Asterisk 13 install g729 & g723.1 codecs - open source versions
# This is for x64 Intel CPU with SSSE4 instructions
# To check your CPU type, run: cat /proc/cpuinfo and look for "sse4_1" in the "flags" line then this script works
# To check x32 vs x64, run: getconf LONG_BIT
# If your CPU isnt an x64 or have sse4 support, then get your .so file version at: http://asterisk.hosting.lv/
# Tested on Centos x64 - on a FreePBX Distro 13 x64
echo -------
echo This installs the open source version of the g729 and g723.1 codecs
echo You may need to buy licenses to use these codecs - it is your responsibility.
echo -------
read -rsp $'Press any key to continue OR CTRL-c to QUIT ...\n' -n1 key
@safebuffer
safebuffer / xml_json.py
Last active March 14, 2023 03:36
Nmap XML output to Json
import json,xmltodict
"""
Nmap XML Output to Json Output in Python
example : data = xml2json('nmap_output.xml')
"""
def xml2json(xml):
xmlfile = open(xml)
xml_content = xmlfile.read()
xmlfile.close()
xmljson = json.dumps(xmltodict.parse(xml_content), indent=4, sort_keys=True)
@mjbnz
mjbnz / nginx-rproxy-with-sso.md
Last active April 18, 2025 01:15
Nginx Reverse Proxy with simple SSO

Nginx Reverse Proxy for homelab services using SSO

NOTE: This document has now been added to the nginx-sso wiki, here. Any further updates will be made there.

Using: