Skip to content

Instantly share code, notes, and snippets.

@TradeClaw
TradeClaw / umbrel-ubuntu-20-04.md
Last active May 9, 2024 05:24 — forked from mayankchhabra/umbrel-ubuntu-20-04-x86.md
Installing Umbrel on Ubuntu 20.04

Install Ubuntu Server 20.04

There is no guarantee this guide will work flawless on earlier or later versions of Ubuntu!

  • 1 CPU & 4GB RAM minimum (more CPU helps initial sync)
  • 1TB SSD disk minimum
  • Resize ubuntu-lv to 50G
  • Create new umbrel-lv for the remaining space and new mount /umbrel
  • Select 'Install OpenSSH Server'
  • Do NOT choose the docker feature, this will be installed manually
  • Reboot after security patching finishes
  • Login via SSH
@nthState
nthState / marchingAnts.fsh
Created April 15, 2018 19:33
Marching Ants
/**
Drag marching ants on SKShapeNode stroke
https://stackoverflow.com/questions/16838907/drawing-marching-ants-using-directx
*/
void main() {
float w = ((int)(v_tex_coord.x + v_tex_coord.y + (u_time*4)) % 8);
gl_FragColor = (w < 4 ? vec4(1,1,1,0) : vec4(0.48,0.84,0.99,1));
}
@pesader
pesader / starship.toml
Last active May 9, 2024 05:22
[Display toolbx information on starship prompt] Show distro and container name on the shell prompt #starship #toolbox #podman
[custom.toolbox]
description = "The activated toolbox container"
command = "echo $(. /var/run/.containerenv; echo ${name}: ${DISTTAG%container})"
when = """ [[ -f /run/.containerenv && -f /run/.toolboxenv ]] """
style = "bold red"
format = "[\\[$output\\]]($style) "
disabled = false
@AlecsFerra
AlecsFerra / animated_wallpaper.c
Last active May 9, 2024 05:17
POC for simple animated wallpapers in Xorg
#define _POSIX_C_SOURCE 199309L
//#define DEBUG
#include <Imlib2.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 9, 2024 05:15
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@littlee
littlee / toUnicode.js
Last active May 9, 2024 05:11
JavaScript convert string to unicode format
function toUnicode(str) {
return str.split('').map(function (value, index, array) {
var temp = value.charCodeAt(0).toString(16).toUpperCase();
if (temp.length > 2) {
return '\\u' + temp;
}
return value;
}).join('');
}
@realvjy
realvjy / ChoasLinesShader.metal
Last active May 9, 2024 05:10
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@magnetikonline
magnetikonline / README.md
Last active May 9, 2024 05:08
Install AWS CLI v2 from source.

Install AWS CLI v2 from source

Bash script to install the latest released version of the AWS CLI v2 from the distrubuted source.

Using this method to exectue the CLI under a MacBook M1 laptop as a native ARM binary - rather than falling back to Rosetta. Currently the offically packaged macOS .pkg doesn't support both Intel/M1 architectures.

Script designed to be re-run - will blow away an existing install and re-install the latest available version.

Note

This install script assumes you have installed a suitable version of Python 3 - has been tested against Python 3.10.11 under macOS Sonoma v14.4.1.