Skip to content

Instantly share code, notes, and snippets.

View fqqf's full-sized avatar
💭
I may be slow to respond. Sorry!

Mifia fqqf

💭
I may be slow to respond. Sorry!
View GitHub Profile
@Alexufo
Alexufo / simple-https-python-server.py
Last active April 24, 2024 18:44
Simple Python https server example py 3.10+ ( multithread, wasm, gzip )
import http.server
import http.cookiejar
import io
import socket
from http import HTTPStatus
import ssl
import os
import zlib
server_address = ('0.0.0.0', 4443)
@lucianoratamero
lucianoratamero / README.md
Last active May 5, 2023 06:48
Export Gnome settings and extensions python script

migrate_gnome_settings.py

This script makes it easier to copy Gnome settings and extensions from one pc to the other. It supports python>=3.5.

To use it, download it, then run python3 migrate_gnome_settings.py --export-settings to create a tar.gz file with all the settings.

Then, on your new system, copy the script and the gzip to your user's home directory and run python3 migrate_gnome_settings.py --import-settings.

For now, the script migrates:

@justincjahn
justincjahn / README.md
Last active January 16, 2024 20:15
Minecraft server(s) using systemd and screen.

Install

# Install dependencies
sudo yum install -y java-1.8.0-openjdk screen

# Create a new unprivileged user for minecraft
useradd -r -m -d /opt/minecraft minecraft

# Create the directory that will house our minecraft instances

sudo su --shell /bin/bash minecraft

@BlazOrazem
BlazOrazem / pc_doctor.txt
Last active August 24, 2023 21:34
Best tools for the health of your PC
TFC - Temp File Cleaner
A small utility that will clean out all the folders on your computer that house temporary files.
http://www.bleepingcomputer.com/download/tfc/
***
ADW Cleaner
AdwCleaner is a program that searches for and deletes Adware, Toolbars,
Potentially Unwanted Programs (PUP), and browser Hijackers from your computer.
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@willurd
willurd / web-servers.md
Last active May 17, 2024 16:24
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000