Skip to content

Instantly share code, notes, and snippets.

View eznix86's full-sized avatar
🎯
Focusing

Bruno Bernard eznix86

🎯
Focusing
View GitHub Profile
@goranculibrk
goranculibrk / MigrateDatabaseServers.php
Last active October 16, 2024 13:31
Synchronize Production and Local Postgres Databases.
<?php
namespace App\Console\Commands\Maintenance;
use Illuminate\Console\Command;
use Symfony\Component\Process\Process;
class MigrateDatabaseServers extends Command
{
/**
@stenuto
stenuto / convert.sh
Created May 29, 2024 03:45
Convert video file into HLS playlist with multiple resolutions and bitrates
#!/bin/bash
# This script takes a video file as input and converts it into an HLS (HTTP Live Streaming) playlist with multiple resolutions and bitrates. It also generates a thumbnail image from the video.
# Check if an input filename is provided
if [ -z "$1" ]; then
echo "Usage: $0 input_filename (without extension) [-t]"
exit 1
fi
@ThioJoe
ThioJoe / Appx-Uninstaller.ps1
Last active November 6, 2024 16:36
A basic script for uninstalling a list of app packages in Windows 10/11, including those pre-installed with Windows
# A basic script for uninstalling app packages in Windows 10/11, including those pre-installed with Windows
#
# Note: If you get an error about the script not being allowed to run, the below command will change the execution polciy temporarily for one session only:
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
#
# To execute the script, open a Powershell window to the directory with the script and run the following command using your scripts file name (and don't forget the .\ )
# .\WhateverScriptName.ps1
# -------------------------------------------------------------------------------------------
# Script by ThioJoe - https://github.com/ThioJoe
# Source: https://gist.github.com/vfarcic/8301efb15748af1da3e376b7132e519e
###################################################################
# Should We Run Databases In Kubernetes? CloudNativePG PostgreSQL #
# https://youtu.be/Ny9RxM6H6Hg #
###################################################################
# Additional Info:
# - CloudNativePG: https://cloudnative-pg.io
# - EDB: https://enterprisedb.com
@cmdruid
cmdruid / filter.ts
Last active October 10, 2024 13:04
Nostr Event Filter Example
/** Basic implementation of NIP 01 filters in typescript. */
interface Event {
id : string
kind : number
created_at : number
pubkey : string
subject ?: string
content : string
sig : string
@jakelevi1996
jakelevi1996 / Notes on Python.md
Last active March 31, 2023 11:28
Notes on Python

Notes on Python

This is a collection of notes on Python, including useful links, useful snippets, Python implementations of algorithms, and notes on built-in and third-party modules.

TODO: migrate existing Python-related Gists into subsections of this Gist

Contents

@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active November 13, 2024 09:01
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@nelsondev19
nelsondev19 / optimization-images-fastapi.py
Created November 19, 2021 22:10
Optimization of images with FastAPI (Python)
from fastapi import FastAPI, UploadFile, File, BackgroundTasks
from fastapi.responses import JSONResponse
from os import getcwd
from PIL import Image
app = FastAPI()
PATH_FILES = getcwd() + "/"
import { Component, defineAsyncComponent, defineComponent, h } from 'vue'
export function hydrateNever(componentOrFactory: Component): Component {
return makeHydrationBlocker(componentOrFactory, {
beforeCreate() {
this.never = true
},
})
}
@LouManglass
LouManglass / .gitlab-ci.yml
Created March 1, 2021 15:36
Sample Gitlab CI job configuration to run tests on merge requests
default:
image: node:15
run-tests:
script:
- npm install @useoptic/cli # or add as a development dependency in your package manager
- npx api run run-diff-tests --exit-on-diff
only:
- merge_requests