Skip to content

Instantly share code, notes, and snippets.

View sathishrs's full-sized avatar
🏠
Working from home

Sathish sathishrs

🏠
Working from home
View GitHub Profile
package com.example.MigrationService;
import io.quarkus.arc.Arc;
import io.quarkus.arc.InstanceHandle;
import io.quarkus.flyway.runtime.FlywayContainer;
import io.quarkus.flyway.runtime.FlywayContainerProducer;
import io.quarkus.flyway.runtime.QuarkusPathLocationScanner;
import io.quarkus.runtime.StartupEvent;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.flywaydb.core.Flyway;
@vvickedvveb
vvickedvveb / React_TypeScript_17_0_2.md
Last active January 28, 2024 17:59
Downgrade to React 17.0.2 From 18 with TypeScript Using create-react-app

Install

npx create-react-app my_app --template typescript

package.json,

Replace versions with following...

"dependencies": {
...
@mkows
mkows / server-cors.py
Created July 31, 2019 15:16
Allow CORS with python Simple HTTP Server – for Python 3
'''
Based on https://gist.github.com/enjalot/2904124 (in Python 2) -> quick-migrated to Python 3
Usage: python server-cors
'''
import http.server as httpserver
class CORSHTTPRequestHandler(httpserver.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
@zoilomora
zoilomora / README.md
Last active April 15, 2025 01:56
How to disable cloud-init in Ubuntu

How to disable cloud-init in Ubuntu

Prevent start

  • Create an empty file to prevent the service from starting

      sudo touch /etc/cloud/cloud-init.disabled
    

Uninstall

@tajidyakub
tajidyakub / README.md
Created August 22, 2018 09:04 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@mrbar42
mrbar42 / README.md
Last active March 14, 2025 21:14
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@badri
badri / cbv_multiple_forms.html
Created January 18, 2018 04:03
Django multiple forms code with sample usage
{% extends "base.html" %}
{% block content %}
<form method="post">{% csrf_token %}
{{ forms.subscription }}
<input type="submit" value="Subscribe">
</form>
<form method="post">{% csrf_token %}
{{ forms.contact }}
<input type="submit" value="Send">
@xdel
xdel / set_irq_affinity.sh
Last active July 17, 2023 16:56
Sets IRQ affinity on intel NICs, this version handles systems with >32 cores
# setting up irq affinity according to /proc/interrupts
# 2008-11-25 Robert Olsson
# 2009-02-19 updated by Jesse Brandeburg
# 2012-12-21 fix for systems with >32 cores by Andrey K.
#
# > Dave Miller:
# (To get consistent naming in /proc/interrups)
# I would suggest that people use something like:
#char buf[IFNAMSIZ+6];
#
@ipmb
ipmb / settings.py
Last active February 23, 2025 14:15
Django logging example
import logging.config
import os
from django.utils.log import DEFAULT_LOGGING
# Disable Django's logging setup
LOGGING_CONFIG = None
LOGLEVEL = os.environ.get('LOGLEVEL', 'info').upper()
logging.config.dictConfig({
@mrbar42
mrbar42 / README.md
Last active April 9, 2025 18:03
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8