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 / 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!
@xZero707
xZero707 / virt-manager.md
Created May 18, 2020 13:10 — forked from Jiab77/virt-manager.md
Virt-Manager Installation (for ubuntu based distrib)

Virt-Manager Installation (for ubuntu based distrib)

This gist will give you all installation steps needed to install properly virt-manager with all dependencies.

Dependencies

Here is the list of all dependencies required to install properly virt-manager on your ubuntu based distrib.

  • libvirt-bin
  • qemu
@xZero707
xZero707 / alpine-docker-setup.sh
Created May 15, 2020 18:41 — forked from grownseed/alpine-docker-setup.sh
Alpine Docker Dev Host Setup
#/bin/sh
#
# The following assumes a default Alpine install using the standard Alpine image
#
# Note: for VirtualBox, you could be tempted to use the `alpine-virt` image,
# however it uses the `virtgrsec` kernel, for which there is no guest additions support
# if required, SSH root password access can be enabled by adding `PermitRootLogin yes`
# to `/etc/ssh/sshd_config`
@xZero707
xZero707 / linebreak.md
Created May 8, 2020 09:24
Line breaks in markdown
Hello  (<-- two spaces)
World

Hello
World


@xZero707
xZero707 / fake-ssl-enabled.php
Last active April 13, 2020 11:38
Fake HTTP(S) state for stubborn PHP app that won't operate over HTTP even though you desire it too. Pay attention to in-code comment.
<?php
/**
* Fake headers so it looks like request is coming from SSL
* In my case, I'm hosting app in the isolated docker container behind nginx-proxy.
* For simplicity sake, connection between nginx-proxy and the app is http.
* Connection between nginx-proxy and the client is normally SSL-only (HSTS).
* Wordpress in particular caused problems in this config.
* NOTE: DO NOT USE THIS ON WEBSITE EXPOSED TO THE INTERNET IF SSL SECURITY IS DESIRABLE!
*/
$_SERVER['HTTP_UPGRADE_INSECURE_REQUESTS'] = false;
@xZero707
xZero707 / install-php.sh
Created February 18, 2020 08:56
Install PHP on Ubuntu 18.04 from ppa:ondrej/php
# This will install PHP with enough extensions to be able to run most of the applications
# More might be needed depending of your app.
sudo add-apt-repository ppa:ondrej/php
sudo apt update
# Replace php7.4 with your arbitary version, eg. php7.1
sudo apt -y install php7.4 php7.4-{common,json,cli,curl,gd,mysqli,mysqlnd,intl,imagick,gettext,sqlite,apcu,xmlwriter,simplexml}
@xZero707
xZero707 / IPB4_Centminmod.conf
Created February 13, 2020 12:49
Invision Power Board v4 Nginx configuration file for use with Centminmod.
# IPB4 Working NGINX site conf file
# Tested on IPB 4.3+ and Centminmod 123.09beta01
# This file is for a FORCED SSL site. Non-SSL requests will be directed to SSL.
# Replace domain.com with your IP address or domain name.
# IPv6 is now included.
# Replace IPv4 and IPv6 with the actual addresses.
# Information gathered from
# Centminmod.com / Information pulled from multiple guides. Thx eva2000!