Skip to content

Instantly share code, notes, and snippets.

View UmutAlihan's full-sized avatar

Alihan UmutAlihan

  • Istanbul, Turkey
View GitHub Profile
# pip install docxcompose
# Combines all word files under docs folder
import os
from pathlib import Path
from docxcompose.composer import Composer
from docx import Document as Document_compose
@misho-kr
misho-kr / Introduction to Airflow in Python.md
Last active March 15, 2021 20:28
Summary of "Introduction to Airflow in Python" from Datacamp.Org (https://gist.github.com/misho-kr/873ddcc2fc89f1c96414de9e0a58e0fe)

A guide to the basic concepts of Airflow and how to implement data engineering workflows in production

By Mike Metzger, Data Engineer Consultant @ Flexible Creations

Intro to Airflow

An introduction to the components of Apache Airflow and why to use them

@JeremyMorgan
JeremyMorgan / getbadguys.sh
Created February 8, 2020 04:35
Get a list of IP addresses trying to attack your CentOS server
#/usr/bin/bash
# strings to look for in our file
# Note: you could just parse the whole file. But if you put in a bad password your IP
# could end up on the bad guy list
declare -a badstrings=("Failed password for invalid user"
"input_userauth_request: invalid user"
"pam_unix(sshd:auth): check pass; user unknown"
"input_userauth_request: invalid user"
"does not map back to the address"
"pam_unix(sshd:auth): authentication failure"
@malikalichsan
malikalichsan / sources.list
Last active July 20, 2021 18:49
/etc/apt/sources.list for ubuntu 19.10
# deb cdrom:[Ubuntu 19.10 _Eoan Ermine_ - Release amd64 (20191017)]/ eoan main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://id.archive.ubuntu.com/ubuntu/ eoan main restricted
# deb-src http://id.archive.ubuntu.com/ubuntu/ eoan main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://id.archive.ubuntu.com/ubuntu/ eoan-updates main restricted
@nealfennimore
nealfennimore / wireguard.conf
Last active September 25, 2024 19:58
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@raneomik
raneomik / wsl-terminator.vbs
Last active January 27, 2024 03:58
vbscript to run Terminator and xServer under wsl
' https://medium.com/@bhupathy/install-terminator-on-windows-with-wsl-2826591d2156
set shell = CreateObject("Wscript.Shell")
xServerProcessName = "vcxsrv.exe"
RunXserverProcess( xServerProcessName )
RunTerminator()
KillXserverProcess( xServerProcessName )
@GermaniumSystem
GermaniumSystem / pwnagotchi notes
Last active March 7, 2024 14:37
How to set up a pwnagotchi in 25* simple steps.
Preface:
I have no idea if any of this is the "right" way of doing it. This is just how I got my unit working.
Good luck.
WARNING: Do not use a V1 Waveshare display module with a stock pwnagotchi! The pwnagotchi expects a V2 module, and may irreparably damage a V1 module!
A V1 display module *can* work, but you must modify `waveshare.py` and `display.py` beforehand. For the time being, this is left as an exercise for the reader.
If you have already burnt a V1 display, try disconnecting it from the Pi and leaving it overnight. This may rejuvenate the display somewhat, but it will likely still display signs of damage.
Installation:
1. `dd` Raspbian Lite to an SD card.
@mamedshahmaliyev
mamedshahmaliyev / ssl_fix.sh
Last active March 7, 2024 13:51
Self-signed certificate issues, disable SSL verification, ignore SSL related errors etc.
####### installation of self-signed certificate into CentOS7 (RHEL) #######
mkdir -p /etc/pki/ca-trust/source/anchors
cp /path/to/self_signed_cert.crt /etc/pki/ca-trust/source/anchors/self_signed_cert.crt
chmod +x /etc/pki/ca-trust/source/anchors/self_signed_cert.crt
sudo update-ca-trust
####### installation of self-signed certificate into Ubuntu (Debian) #######
mkdir -p /usr/local/share/ca-certificates/
cp /path/to/self_signed_cert.crt /usr/local/share/ca-certificates/self_signed_cert.crt
chmod +x /usr/local/share/ca-certificates/self_signed_cert.crt
@pirate
pirate / docker-compose-backup.sh
Last active October 25, 2024 01:51
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
@andy-thomason
andy-thomason / Genomics_A_Programmers_Guide.md
Created May 14, 2019 13:32
Genomics a programmers introduction

Genomics - A programmer's guide.

Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.

https://www.genomicsplc.com