Skip to content

Instantly share code, notes, and snippets.

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

Oscar Martin Fronix

🏠
Working from home
View GitHub Profile
@Fronix
Fronix / usePagination.ts
Last active May 22, 2023 12:00
MUI Pagination hook adjusted for InstantSearch zerobased pagination
import { unstable_useControlled as useControlled } from '@mui/utils';
import type {
UsePaginationItem,
UsePaginationProps,
UsePaginationResult
} from './usePaginationTypes';
/**
* VERIFIED USING
* - react-instantsearch-hooks-web@6.44.0
@Fronix
Fronix / release-cleanup.ps1
Last active October 11, 2022 10:33
Cleanup release folders
# Clean up old releases on the server
# This script will check a specified folder for all release versions (i.e. R1, R2, R3, etc.) and delete all except the last X releases.
# Can be used together with Azure DevOps releases, each rlease is named RX which this script takes care of
# Modify $regex = '^.*?\(R(?<release>\d+)\).*' if you want to look for your own foldertype
# Usage
# release-cleanup.ps1 -releasesPath /path/to/release -releasesToKeep 3
# Options
@Fronix
Fronix / sql-server-m1-mac.md
Created May 11, 2022 14:15
How to use SQL server on M1 Mac

How to use SQL server on M1 Mac

Prerequisites

  • Docker & docker-compose
  • Brew

Setup Colima VM

brew install colima
services:
mssql:
image: mcr.microsoft.com/mssql/server
ports:
- '1433:1433'
environment:
SA_PASSWORD: 'SoM3C0mLiC4t3dP4szWoRd'
ACCEPT_EULA: 'Y'
MSSQL_PID: 'Express'
volumes:
@Fronix
Fronix / GitVersion.yml
Created December 15, 2021 10:43
GitVersion for GitFlow workflows (develop, main, releases)
mode: ContinuousDelivery
increment: Inherit
major-version-bump-message: '\+ver:\s?(breaking|major)'
minor-version-bump-message: '\+ver:\s?(feature|minor)'
patch-version-bump-message: '\+ver:\s?(fix|patch)'
no-bump-message: '\+ver:\s?(none|skip)'
tag-prefix: '[vV]'
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatchTag
assembly-informational-format: '{InformationalVersion}'
@Fronix
Fronix / radarr-delete-unmonitored-olderthanx.sh
Created August 4, 2021 12:40
Delete unmonitored radarr movies added before X date
#!/bin/sh
HOST=http://local.radarr
API_KEY=
# Add your min date here
# All movies added before this date gets deleted
date=$(date "+%s" -d "2020-04-01")
ids=$(curl --silent $HOST/api/v3/movie -X GET -H "X-Api-Key: $API_KEY" \ |
jq '[.[] | select ((.monitored == false) and (.added | fromdateiso8601 < '"$date"')) | .id'])
@Fronix
Fronix / RadarrTautulliPlexDelete.js
Last active July 24, 2021 15:57
Script to delete movies that are not downloaded or watched for X months/last played date from Radarr (Outdated)
{
/** OUTDATED **/
//based on https://gist.github.com/ojame/93560d99149124ea2f89b9d78cbcadd1
// RadarrAPI: Go to Radarr and click 'settings' => 'general'.
// TautulliAPI: Go to Tautulli and click 'Settings' => 'Web Interface'
// Open the JavaScript Console in Google Chrome (View => Developer => Javascript Console)
// Past the following in. Hit enter and away you go.
// Alternatively you can use Sources->Snippets in Chrome
//Update 2020-04-08:
███████╗██████╗ ██████╗ ███╗ ██╗██╗██╗ ██╗ ███████╗███████╗
██╔════╝██╔══██╗██╔═══██╗████╗ ██║██║╚██╗██╔╝ ██╔════╝██╔════╝
█████╗ ██████╔╝██║ ██║██╔██╗ ██║██║ ╚███╔╝ ███████╗█████╗
██╔══╝ ██╔══██╗██║ ██║██║╚██╗██║██║ ██╔██╗ ╚════██║██╔══╝
██║ ██║ ██║╚██████╔╝██║ ╚████║██║██╔╝ ██╗██╗███████║███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝╚═╝╚══════╝╚══════╝
@Fronix
Fronix / resume.json
Last active February 29, 2020 19:31
{
"basics": {
"name": "Oscar Martin",
"picture": "https://avatars2.githubusercontent.com/u/631180?v=4",
"label": "@meridium ",
"headline": "Webdev\r\nReact, C# and TypeScript\r\nI also dabble in perfection",
"summary": null,
"website": "www.fronix.se",
"blog": null,
"yearsOfExperience": null,
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff