Skip to content

Instantly share code, notes, and snippets.

@iydon
iydon / csgo.cfg
Last active October 26, 2023 07:30
CS:GO configuration
unbindall
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"
bind "7" "slot7"
bind "8" "slot8"
@oursocks
oursocks / recaptcha-v3-solver.py
Created August 24, 2019 07:29
How to solve reCAPTCHA v3 using Python for Scraping the Easy Way (Using an OCR API)
import imagetyperzapi2
#... then go to the page using a webdriver object called driver
try:
driver.find_element_by_xpath("//*[@data-sitekey]")
captcha = True
except NoSuchElementException:
captcha = False
@sumeetkbhardwaj
sumeetkbhardwaj / uwgi-medium-post.ini
Last active April 5, 2025 15:34
uwsgi configuration with most commonly sused options for highly scalable website (medium blog post)
[uwsgi]
# telling user to execute file
uid = bunny
# telling group to execute file
gid = webapps
# name of project you during "django-admin startproject <name>"
project_name = updateMe
@zhouchangxun
zhouchangxun / loadbalancer.py
Created July 5, 2018 08:06
a simple loadbalancer implemention with python.
import sys
import socket
import select
import random
from itertools import cycle
# dumb netcat server, short tcp connection
# $ ~ while true ; do nc -l 8888 < server1.html; done
# $ ~ while true ; do nc -l 9999 < server2.html; done
SERVER_POOL = [('10.157.0.238', 8888)]
@irLinja
irLinja / haproxy healthcheck socks5
Last active December 7, 2023 09:37
systemd services for shadowsocks, KCPTUN, simple obfs and shadowsocks server sample configuration + haproxy + haproxy external check script and privoxy for sure
#!/bin/bash
/usr/bin/curl -sSf --socks5-hostname $(echo ${3}):$(echo ${4}) www.google.com >/dev/null
@thebostik
thebostik / Dockerfile
Created May 30, 2017 22:09
Mozjpeg + Pillow Dockerfile
FROM ubuntu:xenial
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
# build tools
nasm \
build-essential \
autoconf \
automake \
libtool \
@thebostik
thebostik / dynamic_quality.py
Created May 30, 2017 22:02
Python Dynamic Image Quality Example
import cStringIO
import PIL.Image
from ssim import compute_ssim
def get_ssim_at_quality(photo, quality):
"""Return the ssim for this JPEG image saved at the specified quality"""
ssim_photo = cStringIO.StringIO()
# optimize is omitted here as it doesn't affect
# quality but requires additional memory and cpu
@SilverBut
SilverBut / haproxy.cfg
Last active July 7, 2024 19:14
[Haproxy cfg checking Socks5] Haproxy cfg to check the Socks5 connection #tags: GFW, network, haproxy, config
#---------------------------------------------------------------------
# Example configuration for a possible web application. See the
# full configuration options online.
#
# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
#
#---------------------------------------------------------------------
global
log 127.0.0.1 local2
@takeshiyako2
takeshiyako2 / default.conf
Created September 12, 2016 08:41
nginx ngx_http_geoip_module with AWS ELB
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
if ($allowed_country = yes) {
set $exclusions 1;
}