Skip to content

Instantly share code, notes, and snippets.

View kemokemo's full-sized avatar
🎮
ebiten is awesome

kemokemo kemokemo

🎮
ebiten is awesome
View GitHub Profile
@ChampionAsh5357
ChampionAsh5357 / 1194-120-primer.md
Last active May 28, 2024 22:18
Minecraft 1.19.4 -> 1.20 Mod Migration Primer

Minecraft 1.19.4 -> 1.20 Mod Migration Primer

This is a high level, non-exhaustive overview on how to migrate your mod from 1.19.4 to 1.20 using Forge.

This primer is licensed under the Creative Commons Attribution 4.0 International, so feel free to use it as a reference and leave a link so that other readers can consume the primer.

If there's any incorrect or missing information, please leave a comment below. Thanks!

Pack Changes

function ghq-fzf() {
local selected_dir=$(ghq list | fzf --query="$LBUFFER")
if [ -n "$selected_dir" ]; then
BUFFER="cd $(ghq root)/${selected_dir}"
zle accept-line
fi
zle reset-prompt
}
@cloudrkt
cloudrkt / pre-commit
Last active December 20, 2023 08:26
Spellcheck pre-commit hook
#!/usr/bin/env bash
# This script is used to check files with the .md extention (markdown) for spelling errors.
# It will run each .md file through aspell and returns an exit code other then 0 when it matches.
# Where are the markdown files located?
SEARCH_DIR="content"
# Set some fancy colors to indicate errors and wrongly spelled words.
RED='\033[0;31m'
@kiview
kiview / docker_volume_backup.sh
Last active January 18, 2024 12:25
Docker-Compose volume backup
#!/bin/bash
compose_file_path=$1
project_name=$2
backup_path=$3
function backup_volume {
volume_name=$1
backup_destination=$2
@r0l1
r0l1 / confirm.go
Last active June 9, 2024 04:38
Go (golang): How to ask for user confirmation via command line
/* MIT License
*
* Copyright (c) 2017 Roland Singer [roland.singer@desertbit.com]
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@lukas-h
lukas-h / license-badges.md
Last active June 25, 2024 11:34
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@alimbada
alimbada / Export-Chocolatey.ps1
Last active April 21, 2024 11:39
Export installed Chocolatey packages as packages.config - thanks to Matty666
#Put this in Export-Chocolatey.ps1 file and run it:
#.\Export-Chocolatey.ps1 > packages.config
#You can install the packages using
#choco install packages.config -y
Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>"
Write-Output "<packages>"
choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" }
Write-Output "</packages>"
@yonchu
yonchu / color16.sh
Created October 18, 2012 19:28
bashでANSI カラーコード(16色)のカラーパレットを表示
#!/bin/bash
#
# ANSI Color code (16colors)
#
# http://ascii-table.com/ansi-escape-sequences.php
# http://archive.linux.or.jp/JF/JFdocs/Bash-Prompt-HOWTO-5.html
# Escape sequence
@jaybill
jaybill / copytree.go
Created June 5, 2012 17:46
How to copy a directory tree (preserving permissions) in Go.
package main
import "fmt"
import "os"
import "io"
import "io/ioutil"
import "log"
// Copies file source to destination dest.
func CopyFile(source string, dest string) (err error) {