Skip to content

Instantly share code, notes, and snippets.

@Summertime
Summertime / README.md
Last active March 19, 2023 11:22
Bash Book

Bash Book

@niko
niko / README.md
Last active April 25, 2024 23:43 — forked from ePirat/spec.md
Icecast Protocol specification

An collection of documents about icecast/shoutcast streaming.

@UserUnknownFactor
UserUnknownFactor / Japanese SFX.md
Last active April 21, 2024 00:41
Japanese game and manga text sound effect (SFX) database

Introduction

This is a compiled collection of common Japanese SFXs (sound effects or onomatopoeia).

This collection uses mostly Romaji transliterations. Some SFXs can be used in combination with other SFXs; some of them, or combinations thereof, can be written separately for emphasis within the same panel (example: do-ki-, ドッ キッ ), but can be considered part of the same action; some use repeated sub-elements or prolongation characters (ー) within them. All interjections can be written differently, usually to indicate particularly strong or repeated stimulation. For example, a cho in isolation is almost certainly a truncated version of chotto, where the speaker was distracted from finishing the word. A prolongation of a character, on the other hand, often implies lazy, harsh, or sloppy pronunciation, or possibly even a scream. Because of this, many SFXs can have multiple meanings, depending on the action drawn, as well as one's interpretation of that action.

A

a: general interjection and versa

call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
cd main
external\nuget-binary\nuget.exe restore -DisableParallelProcessing
msbuild /t:Restore /p:RestoreDisableParallel=true external\RefactoringEssentials\RefactoringEssentials\RefactoringEssentials.csproj
external\fsharpbinding\.paket\paket.bootstrapper.exe
cd external\fsharpbinding\
.paket\paket.exe restore
cd %WORKSPACE%\main
msbuild /p:Configuration=DebugWin32 /p:Platform="Any CPU" Main.sln
@Taytay
Taytay / install_hub.sh
Created June 26, 2018 19:12
Install latest version of Github's hub on Linux
#!/bin/bash
# Installs latest release of hub on Linux
# Echo, halt on errors, halt on uninitialized ENV variables. (https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/)
set -euxo pipefail
# Hub doesn't have a way to install the latest version using `apt` yet, so I wrote this as a hacky substitute.
# This will be unnecessary when this issue is resolved: https://github.com/github/hub/issues/718#issuecomment-65824284
# Linux options include:
public static class ObservableCollectionExtensions
{
public static IDisposable SuppressCollectionEvents(this INotifyCollectionChanged collection,
bool fireEventWhenComplete = true)
{
return new CollectionEventSuppressor(collection, fireEventWhenComplete);
}
private class CollectionEventSuppressor : IDisposable
{
// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting
@bdash
bdash / dynamic_cast.mm
Last active July 29, 2020 03:09
Excerpt from Hopper pseudocode from __dynamic_cast in libc++abi.dylib
if ((*(int8_t *)guard variable for __dynamic_cast::use_strcmp == 0x0) && (___cxa_guard_acquire(guard variable for __dynamic_cast::use_strcmp, rsi, rdx, rcx, r8, r9) != 0x0)) {
rsi = *_NSGetProgname();
rcx = 0x1;
if (strcmp("Adobe Illustrator", rsi) != 0x0) {
rsi = *_NSGetProgname();
rdx = 0x13;
rcx = strncmp("Adobe Photoshop CS5", rsi, rdx) == 0x0 ? 0x1 : 0x0;
}
*(int8_t *)__dynamic_cast::use_strcmp = rcx;
___cxa_guard_release(guard variable for __dynamic_cast::use_strcmp, rsi, rdx, rcx, r8, r9);

Last updated 2020/03/04

Some links from twitter on the topic of parsing PSD files (haven't looked into them in details). PSD include a flattened rasterized image so this is easy to load if that's the only thing you need. Most software / librairies have support for extracting this flattened data (e.g. stb_image.h does).

However if you want access to individual layers, render non-rasterized layers, emulate every photoshop features, extract or apply effects with more granularity, more code is needed. May range from easy to lots-of-work depending on what exactly you need.

As far as I know there isn't a trivial stb-like ready-to-use C++ library to do that sort of things. Posting all links here. Some are probably bloated or hard to use into your project, some lacking features.

TODO: Actually look into the pros/cons of all those.

@pfmoore
pfmoore / factorio-recipe-parser.lua
Last active September 10, 2021 15:42
Parse the Factorio recipe files to create a CSV of recipes
data = {}
data["extend"] = function (data, t)
for n, recipe in ipairs(t) do
for i, component in ipairs(recipe["ingredients"]) do
cname = component[1] or component["name"]
camt = component[2] or component["amount"]
print('"' .. recipe["name"] .. '","' .. cname .. '",' .. camt)
end
end
end