Skip to content

Instantly share code, notes, and snippets.

View emmmhx's full-sized avatar

Danila Danishevskii emmmhx

View GitHub Profile
@lyf2000
lyf2000 / docker-compose.yml
Last active June 12, 2025 16:35
Install google chrome to use with docker python:3.12.3-bookworm selenium==4.22.0
version: '3'
services:
app:
build:
context: .
dockerfile: ./python.selenium.Dockerfile
command: python main.py
depends_on:
- selenium
@devraj
devraj / celery.py
Last active February 25, 2025 18:41
SQLAlchemy asyncio calls from within a Celery task
# We've been trying to figure out how to run async code from
# Celery until it gets support for it
#
# This is an extracted example which should fit into
# https://github.com/anomaly/lab-python-server
import asyncio
from uuid import UUID
from sqlalchemy.ext.asyncio import AsyncSession
from ...celery import app
@makinori
makinori / convert-glsl-to-hlsl.md
Last active February 18, 2025 18:00
Convert GLSL to HLSL with 100% precision!

Convert GLSL to HLSL with 100% precision!

Have you tried translating GLSL code to HLSL and for some reason it never works, even through you've gone through it line by line? For example with noise functions.

Then do this!

  • Save your shader to a file and add to the top:
    #version 460

precision mediump float;

@Johnnnnnnny
Johnnnnnnny / 1_how_to_make_custom_tooltips.txt
Last active June 10, 2025 15:12
HOW TO MAKE CUSTOM TOOLTIPS - THE MANUAL
Requirements:
- Minecraft (Java) 1.14+
- Resource Pack
If you are not yet familier with custom fonts, I recommend you watch this video before hand to get the hang of the basics or read the
docs by AmberWat:
(https://youtube.com/watch?v=-9bjbL1dYAE&feature=share)
(https://github.com/AmberWat/NegativeSpaceFont/blob/master/README.md) (Credit to AmberWat for the documentation)
Go into your texture pack folder and go to assets/minecraft/font and create a file called default.json, in this file you will put the
@maximousblk
maximousblk / tor.md
Created September 8, 2020 06:29
A super simple guide to starting up your own Tor hidden service

Host your own Tor hidden service!

A super simple guide to spinning up a Tor hidden service. [tl;dr]

Ubuntu 20.04 LTS was used for the making of this guide.

Install Tor

you can install Tor using the following command

@pgrandinetti
pgrandinetti / automatic_websocket_reconnect.py
Last active January 9, 2025 20:48
Automatic reconnect from websockets
import socket
import asyncio
import websockets
import time
import logging
import argparse
import threading
import sys
@cho0o0
cho0o0 / generateAccesskey.js
Last active March 13, 2025 06:48
Generate Outline access key based on Shadowsocks infomation
const generateAccesskey = (method, password, ip, port) => {
const firstPart = btoa(`${method.toLowerCase()}:${password}`)
const secondPart = `${ip}:${port}`
const accesskey = `ss://${firstPart}@${secondPart}`
return accesskey
}
@kocisov
kocisov / next_nginx.md
Last active February 3, 2025 07:27
How to setup next.js app on nginx with letsencrypt

These are notes while researching a way to convert a browser/website to a stream. This could be used for Facebook Live or for webrecording. TL'DR:

  • I started with Phantomjs - but that didn't support the html5 video tag
  • SlimerJS supports it, but there is no way to record audio directly (though this might come from desktop audio)
  • So I moved to research ffmpeg/X11/XVFB to record it with linux which works
  • But ffmpeg has no easy way to mix streams/overlays to I moved on to OBS with overlay browser support
  • I started researching options OBS in docker and it needed best a GPU , so I move to nvidia-docker
  • And so came across building game servers on EC2/AWS using GPUs and managed to run OBS inside of GPU g2x.large machine
  • I tried streaming to twich , which works great and managed to restream 4K 60FPS youtube on an AWS instance
  • Remote control works through OBS-Remote but OBS has kinda limit in types of features
@cpsubrian
cpsubrian / README.md
Last active December 6, 2023 11:03
Compile Xvfb for AWS Lamba