Skip to content

Instantly share code, notes, and snippets.

View creptt's full-sized avatar

creptt

  • creptt_it / Moss
  • different parts
View GitHub Profile
@creptt
creptt / rocketguide.md
Created April 4, 2021 04:08 — forked from belst/rocketguide.md
Deploy Rocket in production

Deploy Rocket using Letsencrypt and nginx

Information

This guide uses the domain your-domain.tld and its www. prefixed version. It starts the rocket application on 127.0.0.1:1337 and as the user www-data. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.

Prerequisites

You need to have nginx, certbot and rust installed.

@creptt
creptt / dynamic.yaml
Created March 26, 2021 06:14 — forked from Mau5Machine/dynamic.yaml
Traefik Dynamic Configuration File
## Setting up the middleware for redirect to https ##
http:
middlewares:
redirect:
redirectScheme:
scheme: https
@creptt
creptt / docker-compose.yml
Created March 26, 2021 06:13 — forked from Mau5Machine/docker-compose.yml
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
@creptt
creptt / docker-compose.yml
Created March 23, 2021 18:08 — forked from peavers/docker-compose.yml
docker-compose file for media server
version: "3"
services:
# https://hub.docker.com/_/traefik
traefik:
container_name: traefik
image: traefik:v2.2
restart: unless-stopped
command:
- --api
@creptt
creptt / command.txt
Created March 14, 2021 18:50 — forked from nrk/command.txt
Using ffprobe to get info from a file in a nice JSON format
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"
@creptt
creptt / nginxproxy.md
Created March 10, 2021 06:18 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@creptt
creptt / yify.md
Created March 10, 2021 03:43 — forked from kuntau/yify.md
YIFY's Quality Encoding

For those that want to keep the YTS going (No, IDGAF about people that don't care for YTS quality) get HandbrakeCLI https://handbrake.fr/downloads... and use the following settings:

user@user:~$HandBrakeCLI -i /file/input.mp4 -o /file/out.mp4 -E fdk_faac -B 96k -6 stereo -R 44.1 -e x264 -q 27 -x cabac=1:ref=5:analyse=0x133:me=umh:subme=9:chroma-me=1:deadzone-inter=21:deadzone-intra=11:b-adapt=2:rc-lookahead=60:vbv-maxrate=10000:vbv-bufsize=10000:qpmax=69:bframes=5:b-adapt=2:direct=auto:crf-max=51:weightp=2:merange=24:chroma-qp-offset=-1:sync-lookahead=2:psy-rd=1.00,0.15:trellis=2:min-keyint=23:partitions=all

Reason to use CLI over GTK has to do with lack of support for advanced settings for Handbrake GTK

** Don't Re-encode already shitty encodes...get good source!**

@creptt
creptt / Cargo.toml
Created March 2, 2021 04:47 — forked from rolisz/Cargo.toml
Simple web crawler in Rust
[package]
name = "rust_crawler"
version = "0.1.0"
authors = ["Roland Szabo <[email protected]>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
reqwest = { version = "0.10", features = ["json", "blocking"] }
@creptt
creptt / senduseragent.py
Created November 26, 2019 23:59 — forked from santosh/senduseragent.py
Return back user agent in Flask. #Python
from flask import Flask, request
app = Flask(__name__)
@app.route('/')
def index():
user_agent = request.headers.get('User-Agent')
return '<p>Your browser is {}!</p>'.format(user_agent)
@app.route('/user/<name>')
def user(name):