Skip to content

Instantly share code, notes, and snippets.

@marcoarment
marcoarment / S3.php
Last active June 25, 2023 19:41
A simple PHP class to perform basic operations against Amazon S3 and compatible services.
<?php
/*
A simple PHP class to perform basic operations against Amazon S3 and compatible
services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules.
Copyright 2022 Marco Arment. Released under the MIT license:
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
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 28, 2024 15:33
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@sroccaserra
sroccaserra / Amiga_samples_conversion.md
Last active May 10, 2024 04:09
Documenting the converstion of old Amiga 8 bit samples

Archive:

These are 8 bit samples often used with the first Amiga trackers of the late 80s and early 90s, like Ultimate Soundtracker. In original and updated formats.

Following the info found in [this other archive][other], I tried to accurately convert the original files to modern & self documenting formats (.wav or .aiff), so they can easily be used in modern DAWs or modern trackers, like

@sroccaserra
sroccaserra / convert_raw_to_aiff.py
Last active April 7, 2024 13:24
Convert from raw to aiff format
import argparse
"""
Works only for raw 8 bit signed mono data.
This script was writen as an easy way to convert original Amiga ST-XX raw
samples to a more documented format that keeps the original data untouched.
See also:
@jacklorusso
jacklorusso / workbench.colorCustomizations.json
Last active December 19, 2023 07:40
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",
@370417
370417 / shadowcasting.js
Created April 24, 2016 15:10
Symmetric recursive shadowcasting
/**
* Recursive shadowcasting algorithm.
* This algorithm creates a field of view centered around (x, y).
* Opaque tiles are treated as if they have beveled edges.
* Transparent tiles are visible only if their center is visible, so the
* algorithm is symmetric.
* @param cx - x coordinate of center
* @param cy - y coordinate of center
* @param transparent - function that takes (x, y) as arguments and returns the transparency of that tile
* @param reveal - callback function that reveals the tile at (x, y)
@harthur
harthur / snippet.md
Created June 18, 2012 22:12
console.log() key binding for Sublime Text

Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:

[
    { "keys": ["super+shift+l"],
      "command": "insert_snippet",
      "args": {
        "contents": "console.log(${1:}$SELECTION);${0}"
      }
 }