This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will backup your Coolify instance and move everything to a new server. Docker volumes, Coolify database, and ssh keys | |
# 1. Script must run on the source server | |
# 2. Have all the containers running that you want to migrate | |
# Configuration - Modify as needed | |
sshKeyPath="$HOME/.ssh/your_private_key" # Key to destination server | |
destinationHost="server.example.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Demo settings, fill them in with the data from your sprite sheet: | |
-- - Image: the uploaded link to the image | |
-- - Cols: number of columns on your sheet | |
-- - Rows: number of rows on your sheet | |
-- - FPS: desired frame rate for the animation | |
-- - Skip: how many frames are missing at end of sheet, used for seamless loops | |
local image = 'assets.prod.novaquark.com/113304/503a53c7-3fc0-418e-bb59-97e2dfcf1b8d.jpg' | |
local cols = 19 | |
local rows = 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local max = math.max | |
local concat, insert = table.concat, table.insert | |
local byte, gsub, format, match, rep = string.byte, string.gsub, string.format, string.match, string.rep | |
local buffer = { "Lua globals dump: \r\n\r\n" } | |
local should_get_function_params = true | |
local should_dump_functions = false | |
local table_visited = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Start init | |
console.log('Preparing JS environment...'); | |
console.log('Booting I2c...'); | |
I2C1.setup({scl:NodeMCU.D1, sda:NodeMCU.D2}); | |
// Command object | |
var COMMANDS = {}; | |
// Response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* R e a d m e | |
* ----------- | |
* | |
* In this file you can include any instructions or other comments you want to have injected onto the | |
* top of your final script. You can safely delete this file if you do not want any such comments. | |
*/ | |
// List of valid axis types | |
private readonly string[] AXIS_TYPES = new string[] { "Normal", "Center", "Reverse" }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"final_space": true, | |
"console_title": true, | |
"console_title_style": "template", | |
"console_title_template": "{{if .Root}}root :: {{end}}{{.Shell}} :: {{.Folder}}", | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* fn.flatten_redirect_chain.php | |
* Follows a redirect chain path and either redirects to the final URL or returns it | |
* Author: Matheus Pratta <github.com/matheusmk3> | |
* License: 0BSD | |
* Version: 1.0.0 | |
* | |
* @param string $destination The URL that is part of a redirect chain and shall be resolved | |
* @param mixed $redirect The redirect type to be used (301/302) or false for returning the final URL as string | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set this to your server's owner user (normally www-data) | |
user="www-data:www-data" | |
# Set this to the path to your wp-content | |
wp_content_path="/var/www/html/wp-content" | |
# Gets current year and month numbers | |
year=`date +%Y` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Connects DisplayLink into Xrandr and sets it with 1920x1080 mode, so it can be recognized by kscreen or any other software | |
# Sources: | |
# - https://wiki.archlinux.org/index.php/DisplayLink | |
xrandr --setprovideroutputsource 1 0 | |
xrandr --output DVI-I-1-1 --mode 1920x1080 --right-of eDP-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: WP Managed MySQL 8 Fix | |
Plugin URI: https://gist.github.com/MatheusMK3/4f3acb29ac4fb0e9a03318bcacec1972 | |
Description: Fixes issues regarding MySQL modes (ONLY_FULL_GROUP_BY) when on managed database services. | |
Author: Matheus Pratta | |
Version: 1.0.0 | |
Author URI: https://matheus.io | |
*/ |
NewerOlder