Skip to content

Instantly share code, notes, and snippets.

View gnat's full-sized avatar
:shipit:
ez pz lemon squeezy

Nathaniel Sabanski gnat

:shipit:
ez pz lemon squeezy
View GitHub Profile
@WolfgangSenff
WolfgangSenff / gist:168cb0cbd486c8c9cd507f232165b976
Last active February 15, 2025 13:44
Godot 4.0 Migration/Upgrade guide
## For a beginner-friendly version of the following (more advanced users likely will get better use of the below,
## if you're just starting out...), see this new gist:
## https://gist.github.com/WolfgangSenff/0a9c1d800db42a9a9441b2d0288ed0fd
This document represents the beginning of an upgrade or migration document for GDScript 2.0 and Godot 4.0. I'm focusing on 2D
at the moment as I'm upgrading a 2D game, but will hopefully have more to add for 3D afterward.
## If you want more content like this, please help fund my cat's medical bills at https://ko-fi.com/kyleszklenski - thank you very much! On to the migration guide.

Restore a database from a userfile backup


CockroachDB supports enterprise grade backup and restore using object storage targets. For local development, a userfile scheme was introduced to allow fast prototyping without a heavy burden of spinning up costly infra. A customer requested ability to quickly validate whether they can recover from a complete tear down of a cluster without using object storage. This is my experience and current workaround to get this to work.


Related articles

@heytulsiprasad
heytulsiprasad / tailwind.js
Created September 4, 2020 17:55
Config tailwind to desktop first approach
module.exports = {
theme: {
extend: {},
screens: {
xl: { max: "1279px" },
// => @media (max-width: 1279px) { ... }
lg: { max: "1023px" },
// => @media (max-width: 1023px) { ... }
@sinbad
sinbad / backup_gitea.sh
Created August 9, 2020 14:58
My Gitea Backup & Restore Scripts
#!/bin/bash
# `gitea dump` doesn't currently back up LFS data as well, only git repos
# It primarily backs up the SQL DB, and also the config / logs
# We'll backup like this:
# * "gitea dump" to backup the DB and config etc
# * tar / bzip all the repos since they will be skipped
# * Not rotated because git data is immutable (normally) so has all data
# * rsync LFS data directly from /volume/docker/gitea/git/lfs
# * No need for rotation since all files are immutable
@sloev
sloev / async_mysql.py
Last active May 3, 2021 19:07
asyncio sqlalchemy mysql
from sqlalchemy.pool import QueuePool
from sqlalchemy import create_engine
from contextlib import closing, contextmanager, ExitStack
from sqlalchemy.sql import text
import asyncio
import logging
import time
class AsyncMysqlDatabase:

CockroachDB, Docker Compose and Minio

This is the second in a series of tutorials on CockroachDB and Docker Compose.

You can find the first post here

  • Information on CockroachDB can be found here.
  • Information on Docker Compose can be found here
  • Information on Minio can be found here
  1. Add minio service to the docker-compose.yml file
@thomasbnt
thomasbnt / code_colors_discordjs.md
Last active April 17, 2025 12:21
Code colors for embed discord.js

Here is an updated list of the colors that are currently implemented with a name. To using colors on discord.js, this is a typedef Colors, Colors.Aqua to get the Aqua color.

Name Int value Hex Code
Default 0 #000000
Aqua 1752220 #1ABC9C
DarkAqua 1146986 #11806A
Green 5763719 #57F287
DarkGreen 2067276 #1F8B4C
@danilobatistaqueiroz
danilobatistaqueiroz / mariadb_without_admin_rights.md
Last active July 3, 2023 01:48
mariadb standalone without admin rights
@fiskr
fiskr / download-radiolab.sh
Created February 1, 2017 21:50
Download all Radiolab episodes
#!/bin/bash
# OSX, GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)
for URL in $(curl -sL http://www.radiolab.org/archive/ | grep -i read-more | perl -pe 's/^.*?"(http.*?)".*$/$1/g' | sort -u); do curl -sL $URL | grep -i download | head -n 1 | perl -pe 's/^.*?download="(http.*?)".*$/$1/g' | xargs wget; done
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active May 7, 2025 23:23
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings