Skip to content

Instantly share code, notes, and snippets.

View xZero707's full-sized avatar
🦆
Absent-Minded professor

Aleksandar Puharic xZero707

🦆
Absent-Minded professor
View GitHub Profile
@xZero707
xZero707 / git-commit-coauthored
Created August 30, 2023 15:12
GIT extension to easily commit co-authored during pair-programming sessions.
#!/usr/bin/env bash
is_git_repository() {
if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
return 1
fi
return 0
}
@xZero707
xZero707 / wttrin.sh
Last active May 17, 2022 16:11
Convenient https://wttr.in wrapper
#!/usr/bin/env sh
set -e
LOCATION="$(echo ${1:-} | sed -e 's/ /%20/g')"
curl --get "https://wttr.in/${LOCATION}"
exit $?
# Source: https://stackoverflow.com/a/66101344/1797452
# Mostly useful for Docker so installation of some packages that require systemd is possible.
# When systemctl is run, it will ALWAYS execute successfuly.
ln -s /bin/true /sbin/systemctl
@xZero707
xZero707 / dockersecurity.md
Created February 10, 2021 18:32
Docker Security Hardening
@xZero707
xZero707 / attr.sh
Last active September 21, 2021 20:02
attrs
# Update: Development moved to separate repository https://github.com/N0rthernL1ghts/attr
@xZero707
xZero707 / opera-fix-ffmpeg.sh
Last active October 16, 2021 22:40
Opera browser on linux comes with broken ffmpeg due to legal reasons. This script will fix it using chromium-ffmpeg snap library.
#!/usr/bin/env bash
# DEPRECATED!
# See: https://forums.opera.com/topic/37539/solving-the-problem-of-the-opera-browser-with-video-playback-in-ubuntu-and-similar-distributions-linux-mint-kde-neon/
echo "Deprecated!"
echo "Please refer here https://github.com/xZero707/opera-fix-ffmpeg for an updated version."
@xZero707
xZero707 / galera_cluster.yml
Created September 21, 2020 14:58 — forked from lucidfrontier45/galera_cluster.yml
docker-compose file for mariadb galera cluster
node1:
image: hauptmedia/mariadb:10.1
hostname: node1
ports:
- 13306:3306
environment:
- MYSQL_ROOT_PASSWORD=test
- REPLICATION_PASSWORD=test
- MYSQL_DATABASE=maria
- MYSQL_USER=maria
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@xZero707
xZero707 / alpine-install.sh
Created August 14, 2020 20:04 — forked from thde/alpine-install.sh
A script to install alpine linux on a dedicated server. Tested on Hetzner, Kimsufi / OVH
#!/bin/sh
set -ex
PATH=/bin:/sbin:/usr/bin:/usr/sbin
KEYMAP="us us"
HOST=alpine
USER=anon
ROOT_FS=ext4
BOOT_FS=ext4
@xZero707
xZero707 / google-dorks
Created June 9, 2020 12:19 — forked from stevenswafford/google-dorks
Listing of a number of useful Google dorks.
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!