Skip to content

Instantly share code, notes, and snippets.

View borestad's full-sized avatar

Johan Borestad borestad

View GitHub Profile
@scar45
scar45 / scar45-old-tv.cfg
Last active September 5, 2024 08:48
RetroArch Old School TV Overlay
# scar45's 1986 Retro Hitachi TV Overlay for Retroarch
# https://gist.github.com/scar45/6a0048f3af5a4d02ceb157a4bca03467
#
# Download the actual retro TV image from -- https://i.imgur.com/QY0X5S4.png
# then rename it to "scar45-old-tv.png" and place it beside this file, under
# the main Retroarch 'overlay'/'overlays' folder.
#
# Retroarch Onscreen Display --> Onscreen Overlay Settings
#
# Display Overlay == ON
@ooflorent
ooflorent / canvas.js
Last active February 18, 2024 21:19
Canvas helpers & noise generator
/**
* @param {number} width
* @param {number} height
* @param {!CanvasPattern} pattern
* @constructor
*/
function Texture(width, height, pattern) {
this.width = width
this.height = height
this.pattern = pattern
@Geoff-Ford
Geoff-Ford / composing-software.md
Last active March 14, 2025 20:26
Eric Elliott's Composing Software Series

Eric Elliott's "Composing Software" Series

A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.

Edit: I see that each post in the series now has index, previous and next links. However, they don't follow a linear flow through all the articles with some pointing back to previous posts effectively locking you in a loop.

@hopeseekr
hopeseekr / docker_dedicated_filesystem.md
Created February 3, 2018 04:01
Putting Docker on its own pseudo filesystem

Docker on BTRFS is very buggy and can result in a fully-unusable system, in that it will completely butcher the underlying BTRFS filesystem in such a way that it uses far more disk space than it needs and can get into a state where it cannot even delete any image, requiring one to take drastic actions up to and including reformatting the entire affected BTRFS root file system.

According to the official Docker documentation:

btrfs requires a dedicated block storage device such as a physical disk. This block device must be formatted for Btrfs and mounted into /var/lib/docker/.

In my experience, you will still run into issues even if you use a dedicated partition. No, it seems it requires a standalone

@gopsmith
gopsmith / disable.sh
Last active July 22, 2024 20:35
Disable bunch of #$!@ in High Sierra
#!/bin/bash
# NOTE: This script must be run from Terminal within RECOVERY MODE. This version is for macOS High Sierra.
# There is no need to disable SIP (via csrutil), because recovery mode is not constrained by SIP.
# WARNING: It might enable things that you may not like. Please double check the services in the TODISABLE vars.
#
# For OSes newer than High Sierra, see comments in the original gist author's Catalina version, at
# https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21
# (see the "Note about Big Sur" at the top, and there are comments about Monterey further down).
#
@miguelmota
miguelmota / process_names.txt
Last active August 13, 2024 09:58
macOS process whitelist
# not an exhaustive list
nsurlsessiond "icloud sync"
fseventsd "macos file system events"
WindowServer "macos windows"
DisplayLinkManager "macos driver"
configd "macos dynamic configuration"
displaypolicyd "macos process"
CommCenter "macos keychain"
kernel_task "macos kernel"
@ntrogers
ntrogers / apple_caching_commands.sh
Last active January 30, 2025 13:26
[Apple Cacheing commands]
https://support.apple.com/guide/mac-help/configure-advanced-content-caching-settings-mchl91e7141a/mac
# On client, test caching server availability
/usr/bin/assetcachelocatorutil
# View log
log show --predicate 'subsystem == "com.apple.AssetCache"'
log stream --predicate 'subsystem == "com.apple.AssetCache"'
# Display content cache settings
@pinge
pinge / mobile.video.encoding.md
Last active March 12, 2025 18:50
Video and audio encoding for playback in Android and iOS devices

Video and audio encoding for playback in Android and iOS devices

This document aims to provide an easy way encode video optimized for playback in mobile devices that use the Android or the iOS operating systems.

libx264 is used for (single or two-pass) video encoding and libfdk_aac for audio encoding.

ffmpeg, libx264 and libfdk_aac settings are optimized for playback quality and compatibility on Android and iOS. There is extensive documentation and references for each of the settings used and contributions are very welcome :)

@jogibear9988
jogibear9988 / index.html
Created April 21, 2019 07:28
Electron ES6 Imports
you need to add
<base href="app://./" /> to your head section
@jthomas
jthomas / primes-with-workers.js
Last active April 10, 2022 13:22
Calculating prime numbers on serverless platforms using Node.js Worker Threads and IBM Cloud Functions (Apache OpenWhisk)
'use strict';
const { Worker } = require('worker_threads');
const os = require('os')
const threadCount = os.cpus().length
const compute_primes = async (start, range) => {
return new Promise((resolve, reject) => {
let primes = []
console.log(`adding worker (${start} => ${start + range})`)