Skip to content

Instantly share code, notes, and snippets.

View laurence-myers's full-sized avatar

Laurence Dougal Myers laurence-myers

View GitHub Profile
@laurence-myers
laurence-myers / code-review-emoji-legend.md
Last active December 15, 2023 05:56
Code review emoji legend

I use emojis as a shorthand to categorise my code review comments. These will help you prioritise requested changes, respond to discussions, or otherwise use your judgement to action (or not).

Emoji Description
⛏️ Nitpick. Things to keep the code tidy, or fit with conventions.
🙏 Please make a change.
🐛 Bug. Must be fixed.
💬 Discussion. No action required.
Question. Educate me! (Might lead to a change request.)
👍 Nice work! (No action required.)
@GetVladimir
GetVladimir / Force-RGB-Color-on-M1-Mac.md
Last active May 4, 2024 21:04
Force RGB Color on M1 Mac

Force RGB Color on M1 Mac

How to Force RGB Color Output instead of YPbPr on your M1 Apple Silicon Mac for an External Monitor.

This step-by-step video tutorial will guide you through the procedure of forcing RGB color output on your M1 Mac.

Force RGB Color on M1 Mac

Here is the direct link to the video tutorial: https://www.youtube.com/watch?v=Z1EqH3fd0V4

The video also has Closed Captions (Subtitles) that you can enable, to make it easier to follow if needed.

@NickNaso
NickNaso / cpp.yml
Created June 3, 2020 23:55
Example of Github action for C++ rpoject
# This is a basic workflow to help you get started with Actions
# workflow - цепочка действий
# Имя процесса Билдится на всех типах 📦 🐍
name: CMake Build Matrix
# Controls when the action will run. Triggers the workflow on push
on:
push:
pull_request:
release:
@Lanilor
Lanilor / rimworld-add-or-replace-patch.md
Last active April 9, 2024 08:20
A way to simplify defenvise sequence patches foradding fields

How you use it in the mods patch folder

<Operation Class="[YOUR C# MOD NAMESPACE].PatchOperationAddOrReplace">
    <xpath>/Defs/ThingDef[defName="Plant_TreeBirch"]/plant</xpath>
    <key>growDays</key>
    <value>22</value>
</Operation>

The class you need to add to your C# code

@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 4, 2024 12:46
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@hraban
hraban / ensure-subset-type.ts
Last active March 24, 2017 03:19
Checked subset typing in TypeScript
// Imagine you want to explicitly define which members of a public API
// interface your implementation actually uses. Example: you implement
// a web extension, but only use a few of the members on the argument
// to the onHeadersReceived handler. Explicitly typing this is useful
// when creating mocks in your unit tests.
//
// Here's now you could do it:
@arccoza
arccoza / callable-object-constructor.js
Last active March 6, 2023 21:38
Javascript Callable Object Class / Constructor created by arccoza - https://repl.it/EbN5/18
// This is my approach to creating callable objects
// that correctly reference their object members,
// without messing with prototypes.
// A Class that extends Function so we can create
// objects that also behave like functions, i.e. callable objects.
class ExFunc extends Function {
constructor() {
// Here we create a dynamic function with `super`,
// which calls the constructor of the parent class, `Function`.
@smalljam
smalljam / test.js
Created August 19, 2015 09:34
xlsx library patch, so we can make bold cells and align them to the right
var XLSX = require('xlsx')
function Workbook() {
this.SheetNames = ['Report'];
this.Sheets = {};
}
var wb = new Workbook();
var ws = {
@nadako
nadako / Main.hx
Created June 24, 2015 19:36
Haxe + SDL = native love \o/
class Main {
static function main() {
Sdl.init(Sdl.INIT_EVERYTHING);
var win = Sdl.createWindow("Hello", 100, 100, 800, 600, Sdl.WINDOW_OPENGL);
var ren = Sdl.createRenderer(win, -1, Sdl.RENDERER_ACCELERATED);
var bmp = Sdl.loadBMP("test.bmp");
var tex = Sdl.createTextureFromSurface(ren, bmp);
Sdl.freeSurface(bmp);
for (i in 0...3) {
@transitive-bullshit
transitive-bullshit / image-service.js
Last active November 12, 2021 12:22
Angular service to resize images with antialiasing for use with canvas.
angular.module('demo').service('imageService', function ($http, $q, $timeout) {
var NUM_LOBES = 3
var lanczos = lanczosGenerator(NUM_LOBES)
// resize via lanczos-sinc convolution
this.resize = function (img, width, height) {
var self = { }
self.type = "image/png"
self.quality = 1.0