Skip to content

Instantly share code, notes, and snippets.

View mq1n's full-sized avatar
😎
[object Object]

Koray mq1n

😎
[object Object]
View GitHub Profile
@mq1n
mq1n / docker-it.sh
Created October 27, 2021 22:46 — forked from mattgrayisok/docker-it.sh
A simple script to install docker on a server
#!/bin/sh
curl https://get.docker.com | sh
sudo curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo usermod -aG docker $USER
echo "****************"
echo "* Docker and docker-compose have been installed"
echo "* The current user has been added to the docker group"
echo "* Close and restart this session or run 'su - $USER' to refresh your active groups"
echo "****************"
@mq1n
mq1n / docker-compose.yaml
Created November 4, 2021 22:16 — forked from natcl/docker-compose.yaml
Docker Compose Syslog Example
version: '2'
services:
nodered:
image: nodered/node-red-docker:0.17.5
restart: always
environment:
- TZ=America/Montreal
logging:
driver: syslog
options:
@mq1n
mq1n / tor-raw.cpp
Created January 6, 2022 08:16 — forked from anhldbk/tor-raw.cpp
Working with Tor (C/C++)
// g++ -lstdc++ -Wno-write-strings fetch.cpp -o fetch
#ifdef _WIN32 // Windows
#include <winsock2.h>
#include <ws2tcpip.h>
#define MSG_NOSIGNAL 0
#else // Linux + Mac
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@mq1n
mq1n / main.yml
Created March 16, 2022 10:38 — forked from swisskyrepo/main.yml
Elastic EDR Ansible
---
- name: Add required dependencies.
apt:
name:
- apt-transport-https
- gnupg2
state: present
- name: Add Elasticsearch apt key.
apt_key:
@mq1n
mq1n / upscaler.py
Last active January 11, 2026 13:28
Topaz Photo AI CLI Sample with Python Automated Script & DDS Support
import os, sys, subprocess
try:
from wand.image import Image
except ImportError:
os.system('python -m pip install wand')
from wand.image import Image
def main(args):
if len(args) < 1:
print('Usage: upscaler.py <input_image> [output_image]')
@mq1n
mq1n / SafeExec.hpp
Created August 20, 2024 14:25
A C++ utility for safe function execution with comprehensive exception handling. Supports both sync and async execution and cross platform compatible
#pragma once
#include <any>
#include <functional>
#include <optional>
#include <type_traits>
#include <utility>
#include <thread>
#include <future>
#include <iostream>
#include <array>
@mq1n
mq1n / gist:81d0847ac3b150a21a22a62f998e015e
Created October 9, 2024 14:26
Wireguard docker sample
volumes:
etc_wireguard:
services:
wg-easy:
environment:
# Change Language:
# (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th, hi, ja, si)
- LANG=en
@mq1n
mq1n / cf-captcha-load-fix-ipboard4.user.js
Created December 26, 2024 08:03
IPSv4 Cloudflare infinite loop fix
// ==UserScript==
// @name IPSv4 Cloudflare infinite loop fix
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Fixes Cloudflare's infinite captcha loading loop on IPS Board v4 forums by patching service worker registration
// @match https://metin2.dev/*
// @grant none
// @run-at document-start
// ==/UserScript==
@mq1n
mq1n / main.yml
Created December 29, 2024 14:18
m2 ci build config
name: build
on:
push:
branches:
- main
jobs:
bsd:
runs-on: ubuntu-latest
@mq1n
mq1n / CloudflareCheck.hpp
Created February 16, 2025 19:20
simple C++ function which verifies if an IP address is part of Cloudflare's network with IPv4 and IPv6 support
#include <iostream>
#include <vector>
#include <string>
#include <asio.hpp>
#include <stdexcept>
#include <optional>
#include <xorstr.hpp>
namespace CloudflareChecker
{