Skip to content

Instantly share code, notes, and snippets.

View canthis's full-sized avatar

SilentDepthz canthis

  • CanThis
  • Rēzekne, Latvia
View GitHub Profile
@cplpearce
cplpearce / country_codes
Created March 23, 2022 21:54
Country Codes with Bounding Box
{
"aw": {
"name": "Aruba",
"alpha-2": "AW",
"alpha-3": "ABW",
"country-code": "533",
"iso_3166-2": "ISO 3166-2:AW",
"region": "Americas",
"sub-region": "Latin America and the Caribbean",
"intermediate-region": "Caribbean",
@gh640
gh640 / use_mysqltuner_in_mariadb_container.sh
Last active February 28, 2024 02:10
Sample: Use MySQLTuner in `mariadb` Docker container
# MySQLTuner: https://github.com/major/MySQLTuner-perl
# Open Bash with the container.
docker exec [mariadb_or_mysql] bash
# Change the working directory to `/tmp`.
cd /tmp
# Install wget.
apt-get update
@traumverloren
traumverloren / style.css
Last active January 7, 2024 14:05
VSCode Customizations for Operator Mono, Fira Code, and Dark Candy Theme
/*
Instructions for MacOS:
- Install the fonts 'Operator Mono' & 'Fira Code'
- Install theme 'Dark Candy'
- Add the following config to the VS Code settings.json:
{
"editor.renderWhitespace": "all",
"editor.fontSize": 14,
@daftspunk
daftspunk / ajax-file-upload.htm
Created July 29, 2017 07:52
Sample AJAX file upload via October CMS
title = "AJAX File Upload"
url = "/test"
layout = "default"
is_hidden = 0
==
<?php
use System\Models\File;
function onSubmit()
{
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE