Skip to content

Instantly share code, notes, and snippets.

View oddmario's full-sized avatar

Mario oddmario

View GitHub Profile
@drengle
drengle / FlaskOnSharedHosting.md
Last active June 30, 2025 18:25
How to Create Python Flask Website with Shared Hosting and No Root/Sudo Access.

Intro

I'm writing this walkthrough (here and a few other places) to hopfully make it much easier for anyone to impliment their Python Flask websites in a shared hosting environment.

I know many colleges and courses use Python and Flask to create websites, but it may be difficulat to understand how to translate that website from the classroom to a real hosting environment. I know for me personally it tookmany hours pouring through internet searches before I finally figured out how to get this working.

If you feel like you generally know what you're doing and don't need the basics explained to you then you can skip ahead to step 3.

1. Your Host Must Support Python Development

@yingray
yingray / main.go
Last active April 7, 2025 16:57
Golang: aes-256-cbc examples (with iv, blockSize)
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"encoding/hex"
"fmt"
)

There are lots of command lines which can be used with the Google Chrome browser. Some change behavior of features, others are for debugging or experimenting. This page lists the available switches including their conditions and descriptions. Last automated update occurred on 2018-10-20.

Condition Explanation
-- Report pseudo allocation traces. Pseudo traces are derived from currently active trace events.
--/prefetch:1 /prefetch:# arguments to use when launching various process types. It has been observed that when file reads are consistent for 3 process launches with the same /prefetch:# argument, the Windows prefetcher starts issuing reads in batch at process launch. Because reads depend on the process type, the prefetcher wouldn't be able to observe consistent reads if no /prefetch:# arguments were used. Note that the browser process has no /prefetch:# argument; as such a
@CharlesHolbrow
CharlesHolbrow / ffmpeg-hls.html
Created September 13, 2018 22:44
Example of ffmpeg for live hls streaming with hls.js
<!DOCTYPE html>
<html lang='`en'>
<head>
<meta charset='utf-8'/>
<title>Audio only stream example</title>
<script src="//cdn.jsdelivr.net/npm/hls.js@latest"></script>
<style>
video {
width: 640px;
height: 360px;
@aydinemre
aydinemre / multi_process.py
Created August 13, 2018 15:28
Python Multiprocess shared variable example
import multiprocessing
from functools import partial
# Manager to create shared object.
manager = multiprocessing.Manager()
# Create a global variable.
dictionary = manager.dict()
@scwood
scwood / uuidV4.js
Last active August 3, 2025 13:07
UUID v4 implementation in JavaScript
/*
Paraphrased from RFC 4122:
The formal definition of the UUID string representation is
provided by the following ABNF:
UUID = time-low "-" time-mid "-"
time-high-and-version "-"
clock-seq-and-reserved
clock-seq-low "-" node
@SkyzohKey
SkyzohKey / screen-spoofer.user.js
Last active June 4, 2024 10:23
~ Spoof the reported window.screen as the most common one so that it can't be used to fingerprint browser.
// ==UserScript==
// @name Spoof screen resolution & color depth
// @namespace https://skyzohlabs.be
// @version 1.0.5
// @description Spoof the reported window.screen as the most common one so that it can't be used to fingerprint browser.
// @author SkyzohKey
// @include http://*
// @include https://*
// @run-at document-end
// @grant none
@Jengas
Jengas / index.php
Last active February 11, 2025 18:05
Discord oauth2 example PHP
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('max_execution_time', 300); //300 seconds = 5 minutes. In case if your CURL is slow and is loading too much (Can be IPv6 problem)
error_reporting(E_ALL);
define('OAUTH2_CLIENT_ID', '1234567890');
define('OAUTH2_CLIENT_SECRET', 'verysecretclientcode');
OS X is the platform, Darwin is the operating system, and XNU is the kernel. Namely, the XNU kernel is the core piece of software that provides resource management, hardware abstraction, and scheduling. Darwin consists of the XNU kernel and basic software run by there kernel to provide a UNIX environment. OS X is built atop Darwin and provides a collection of frameworks and services that implement the user interface and main application libraries. Darwin and XNU are open source software, but the frameworks that make up the OS X platform on top of Darwin, are not.
Ubuntu and other distributions are based on the Linux kernel and GNU software suite. Ubuntu is the platform, Linux + GNU is the operating system, and Linux is the kernel (more or less). Unlike OS X, Ubuntu doesn't have proprietary frameworks - everything is open source. And the distinction between the OS and platform are blurred as a result. That's why it's called a distribution, because what distinguishes Ubuntu from other Linux distributions is mo
@steven2358
steven2358 / ffmpeg.md
Last active August 15, 2025 21:37
FFmpeg cheat sheet