Skip to content

Instantly share code, notes, and snippets.

View oscarcb's full-sized avatar

Oscar oscarcb

  • Mexico
View GitHub Profile
@oscarcb
oscarcb / move_plexmetadata.sh
Created May 18, 2025 18:24
Script to move Plex metadata folder to another drive when it fills up, just edit the new_location and backup_location and run
#!/bin/bash
# Define locations almost always the defautl is /var/lib
ORIGINAL_LOCATION="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server"
NEW_LOCATION="/mnt/newDriveSSD/plex/Plex Media Server"
BACKUP_LOCATION="/mnt/BigDriveFor Backups/backups/Plex Media Server"
# Create directories if they don't exist
mkdir -p "$(dirname "$NEW_LOCATION")"
mkdir -p "$(dirname "$BACKUP_LOCATION")"
@oscarcb
oscarcb / bitbucket_pipeline.yml
Created June 24, 2023 18:26
AWS ELB Deploy SDK6 ASP.net Application
image: mcr.microsoft.com/dotnet/sdk:6.0-focal #use the right image
pipelines:
branches:
development:
- step:
script:
- apt update
- apt-get install -y zip
- apt install python3-pip -y #get python pip
@oscarcb
oscarcb / gist:416d5f8c9f65cbc3aa4e3021c71623a4
Created October 27, 2019 00:59
Config.toml for Gitlab runner in Ubuntu to fix docker problem
concurrent = 2
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "*****"
url = "https://gitlab.com/"
token = "*****"
@oscarcb
oscarcb / kubernetes_commands.md
Created July 5, 2019 13:36 — forked from edsiper/kubernetes_commands.md
Kubernetes Useful Commands
{
"JSON": {
"assigner": "c2ae7cfa-dbb3-4094-9dae-e121ddc946b7",
"autoevaluation": true,
"company": "53bab347-10a5-4d9a-9542-888ccd4a32b0",
"created": "2019-05-21T16:18:08.178704Z",
"evaluated": "3e4232a1-ba71-4a5f-8cbb-b210d8ed4b22",
"evaluators": [
"3e4232a1-ba71-4a5f-8cbb-b210d8ed4b22",
"64129288-6ea3-40a0-89b2-357eab386dff",
$( document ).ready(function() {
////console.log(navigator);
if (navigator.userAgent.indexOf('Macintosh') != -1 && navigator.vendor.indexOf('Google') != -1 ) {
$("body").addClass("mac");
} else {
// $("body").addClass("pc");
}
function isEmail(email) {
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
return regex.test(email);
<IfModule mod_mime.c>
AddType text/css .css
AddType application/x-javascript .js
AddType image/bmp .bmp
AddType image/gif .gif
AddType application/x-gzip .gz .gzip
AddType image/x-icon .ico
AddType image/jpeg .jpg .jpeg .jpe
AddType image/png .png
AddType application/x-font-ttf .ttf .ttc
find / -mount -noleaf -type f -size +10000k -print0 | xargs -0 ls -lhSr | perl -ne '/(\S+\s+){4}(\S+)\s+(\S+\s+){3}(.*)/ and printf("%*s %s\n",7,$2.":",$4);'
@oscarcb
oscarcb / gist:a7b37da1f803fbaa5776246d9eebfa2d
Created May 8, 2017 21:07
Optimize Images // Flata agregarlas al path
@echo off
echo Optimizing JPEG ^& PNG Images...
cd "C:\Program Files\Image Optimization"
forfiles /s /m *.jpg /c "cmd /c @\"C:\Program Files\Image Optimization\jpegtran.exe\" -copy none -optimize -progressive -outfile @file @file"
forfiles /s /m *.png /c "cmd /c @\"C:\Program Files\Image Optimization\optipng.exe\" -o7 -strip all @file"
echo. & echo Process done!
pause
@oscarcb
oscarcb / gist:d1e45daba18696c468c750706cc32873
Created April 29, 2017 20:08
Bitbucket Pipeline Example
image: hseeberger/scala-sbt
pipelines:
default:
- step:
script:
- sbt test
branches:
production:
- step: