- KVH Themes
- KVH
- KVH Orange
- Application Themes
- Battle.net
- Discord
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
-- Levenshtein function | |
-- Source: https://openquery.com.au/blog/levenshtein-mysql-stored-function | |
-- Levenshtein reference: http://en.wikipedia.org/wiki/Levenshtein_distance | |
-- Arjen note: because the levenshtein value is encoded in a byte array, distance cannot exceed 255; | |
-- thus the maximum string length this implementation can handle is also limited to 255 characters. | |
DELIMITER $$ | |
DROP FUNCTION IF EXISTS LEVENSHTEIN $$ | |
CREATE FUNCTION LEVENSHTEIN(s1 VARCHAR(255) CHARACTER SET utf8, s2 VARCHAR(255) CHARACTER SET utf8) |
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
## LINKACE CONFIGURATION | |
## Basic app configuration | |
# The application name is used internally and may not be changed | |
APP_NAME=LinkAce | |
COMPOSE_PROJECT_NAME={{ docker_compose_project }} | |
# The URL should be set if you notice issues with URLs generated by Laravel, which might be an issue with | |
# nginx configuration or the proxy you use. | |
APP_URL={{ app_url }} | |
# The environment is usually 'production' but may be changed to 'local' for development |
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
--- | |
app_url: "https://linkace.example.com" | |
proxy_port: 8080 | |
site_root: "/var/www/linkace-demo" | |
site_domain: "linkace.example.com" | |
site_ssl_directory: "/" | |
env_source: "env.j2" | |
env_destination: "{{ deploy_helper.new_release_path }}/.env" |
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
--- | |
version: "3" | |
services: | |
db: | |
image: mariadb:10.6 | |
restart: unless-stopped | |
environment: | |
- MARIADB_ROOT_PASSWORD=${DB_PASSWORD} | |
- MARIADB_USER=${DB_USERNAME} |
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
--- | |
- hosts: linkace | |
vars_files: | |
- vars.yml | |
tasks: | |
- name: Initialize the deploy root | |
deploy_helper: path={{ site_root }} | |
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 | |
// Randomizes the names of all files in the current directory | |
// Use with caution! | |
$files = scandir(__DIR__); | |
$files = array_filter($files, fn($file) => !in_array($file, ['.', '..', 'randomize.php', '.DS_Store'])); | |
echo 'Renaming ' . count($files) . 'files now'; | |
shuffle($files); | |
foreach ($files as $file) { | |
$new = hash('crc32', $file) . time() . '.' . pathinfo($file, PATHINFO_EXTENSION); | |
var_dump("Renaming $file to $new"); |
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 | |
// @see https://www.php.net/manual/en/function.natsort.php | |
$numbers = [26, 6, 2, 65]; | |
sort($numbers); | |
// 2, 26, 6, 65 | |
natsort($numbers); | |
// 2, 6, 26, 65 |
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 | |
// Run all database migrations up to a specific migration and stop there. Useful for testing migrations which alter data or mess with your models. | |
function migrateUntil(string $migration): void | |
{ | |
$migrator = app('migrator'); | |
$dbPath = base_path('database/migrations'); | |
$migrations = collect($migrator->getMigrationFiles($dbPath)) | |
->takeUntil($dbPath . '/' . $migration); |
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
/* reset */ | |
body, td, table, input, textarea, .pagetop, * { | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | |
font-weight: 400; | |
-webkit-font-smoothing: antialiased; | |
} | |
body { | |
background: #fafafa; | |
margin: 0; |
NewerOlder