Skip to content

Instantly share code, notes, and snippets.

@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 5, 2024 00:12
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@aike
aike / chorddetector.ksp
Created May 3, 2024 00:47
Chord detection KONTAKT script
{ Chord detection KONTAKT script by aike }
{ This program is licensed under MIT License. }
on init
set_ui_height_px(470)
set_ui_width_px(970)
make_perfview
set_script_title("main")
set_control_par_str($INST_WALLPAPER_ID, $CONTROL_PAR_PICTURE, "panel")
set_skin_offset(0)
@chenxiaolong
chenxiaolong / example.yaml
Created July 19, 2023 00:53
Custom Ansible module to manage the entire VyOS config
---
- hosts: vyos
vars:
# This would ideally go in the host vars.
vyos_config:
# ...
# The structure is identical to what `show configuration json pretty` in
# operational mode produces. For the vast majority of VyOS commands, the
# command <-> JSON translation is 1:1. For example, the command:
#
@vasanthk
vasanthk / System Design.md
Last active May 5, 2024 00:11
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@mattiasgustavsson
mattiasgustavsson / main.c
Created March 5, 2024 19:18
Minimal code example for creating a window to plot pixels to
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <windows.h>
#pragma comment( lib, "user32.lib" )
#pragma comment( lib, "gdi32.lib" )
#define SCRW 640
#define SCRH 480
#!/usr/bin/python3
# This script built on top of the script by @rspeir on GitHub:
# https://github.com/krzmaz/pico-w-webserver-example/pull/1/files/4b3e78351dd236f213da9bebbb20df690d470476#diff-e675c4a367e382db6f9ba61833a58c62029d8c71c3156a9f238b612b69de279d
# this script looks for all the html file in /html_files directory, relative to current working directory
# if the filename contains "min" in the file name it will not try to minify it
# if there is a html or css file it will minify it
# if there is .noheader in the filename it will create a char[] containing the file. it will just be the data section nothing else
import os
@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.