Skip to content

Instantly share code, notes, and snippets.

@andelf
andelf / font.py
Created January 16, 2021 05:32
CJK Font for Rust embedded-graphics
from PIL import Image, ImageDraw, ImageFont
import PIL.features
# ! brew install libraqm
print('libraqm:', PIL.features.check('raqm'))
size = (320, 16)
"""
FORMAT = "RGB"
@mmozeiko
mmozeiko / !README.md
Last active May 5, 2024 00:02
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone 64-bit MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for 64-bit native desktop app development.

Run python.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK - currently v14.32.17.2 and v10.0.22621.0.

You can list available versions with python.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe from output folder, first run setup.bat - after that PATH/INCLUDE/LIB env variables will be setup to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@bertocq
bertocq / atajosEclipse.textile
Last active May 5, 2024 00:01
Atajos de teclado para Eclipse

Atajos de teclado para Eclipse (y derivados como ZendStudio)

Para editar un comando: Window → Preferences → General → Keys

Edición

Ctrl+D elimina la línea actual (en la que se encuentra el cursor)
Ctrl+Shift+F formatear código (tabulaciones, saltos de línea,…)
@Pathoschild
Pathoschild / stardew-mod-recommendations.md
Last active May 4, 2024 23:59
Stardew Valley mod recommendations

Here are the mods I recommend. These are all compatible with the latest versions of SMAPI and Stardew Valley on Linux/macOS/Windows. See the player's guide to using mods if you're interested.

Quality of life

I think the best mods are those which improve the game while maintaining its balance, lore, and style.

  • AutoGate
    Gates open automatically when you approach and close behind you.

  • Better Sprinklers Plus
    Customise the sprinkler radius, with a proportional change to their cost. If you're willing to mine all the ores you'll need, that makes the basic sprinklers useful early in the game and lets you do more than just watering crops every day.

@hibeekaey
hibeekaey / .gitattributes
Last active May 4, 2024 23:59
Repository for managing GitHub with Terraform
terraform.tfstate filter=git-crypt diff=git-crypt
terraform.tfvars filter=git-crypt diff=git-crypt
@hibeekaey
hibeekaey / github-manager.tftest.hcl
Created May 4, 2024 23:51
Repository for managing GitHub with Terraform
variables {
private_repository = {
name = "github-private-repository-test"
description = "This is a test private repository"
visibility = "private"
archived = false
archive_on_destroy = false
}
public_repository = {
name = "github-public-repository-test"
@hibeekaey
hibeekaey / main.tf
Created May 4, 2024 23:52
Repository for managing GitHub with Terraform
provider "github" {
token = var.token
owner = "hibeekaey"
}
module "repository" {
for_each = var.repositories
source = "github.com/hibeekaey/example-github-manager//modules/repository?ref=v1.0.0"
name = each.value.name
description = each.value.description
@hibeekaey
hibeekaey / Makefile
Created May 4, 2024 23:53
Repository for managing GitHub with Terraform
SCRIPTS_DIR = scripts
# Default target (executed when you run 'make' with no arguments)
all: init-upgrade
# Initialize terraform
init-upgrade:
terraform init -upgrade -reconfigure
# Generate Docs
@hibeekaey
hibeekaey / terraform.tf
Created May 4, 2024 23:54
Repository for managing GitHub with Terraform
terraform {
required_providers {
github = {
source = "integrations/github"
version = "6.2.1"
}
}
@hibeekaey
hibeekaey / terraform.tfvars
Created May 4, 2024 23:54
Repository for managing GitHub with Terraform
token = "ghp_xxxx" # insert your GitHub Personal Access Token here
repositories = {
"aipnd-project" = {
name = "aipnd-project"
description = "AI Programming with Python Nanodegree Project"
visibility = "public"
archived = false
}
}