Skip to content

Instantly share code, notes, and snippets.

View willnode's full-sized avatar

Wildan M willnode

View GitHub Profile
@willnode
willnode / redox_m1.md
Last active April 10, 2024 11:38
Build Redox OS in MacOS Apple Silicon

This is a way to compile Redox OS in MacOS Apple Silicon without using podman.

Clone

git clone --recurse-submodules https://gitlab.redox-os.org/redox-os/redox.git
cd redox

Additional brew installs & deps

@mvidaldp
mvidaldp / sdcard_fix.md
Created April 11, 2022 12:43
SD card formating fix via ADB shell when Android GUI fails (internal, portable/external or mixed). Works on Retroid Pocket 2+

I wrote this short tutorial because extending my internal storage using my new micro SD card on my Retroid Pocket 2+ failed all the time. Only setting it up as portable/external worked. However, this instructions should work in any Android 5.0+ device.

So, in case you have problems setting up your SD card on your Android device via graphical interface (setting up storage as extended internal memory or portable), and you get a corrupted SD card or any other error, follow these steps to fix it via adb shell:

  1. Make sure you have adb access to your Android device: Settings > System > About, touch/click on Build number until Developer options are enabled:
  2. Go to Settings > System > Developer options and enable USB debugging.
  3. Assuming you have adb installed on your remote terminal run the following:

adb shell

@bramus
bramus / script.js
Last active February 27, 2024 22:38
Text-to-Speech with the Web Speech API
// 🗣 Text-to-Speech with the Web Speech API's SpeechSynthesis
// @link https://gist.github.com/bramus/e27fcb783f469b6585007a7453e1bb5a
// @ref https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis
((text) => {
// Create an Utterance (= speech request)
const utter = new SpeechSynthesisUtterance(text);
// Set the voice
utter.voice = window.speechSynthesis.getVoices()[0];
@david-hoze
david-hoze / checksum_calculation.md
Last active May 5, 2024 17:27
How to Calculate IP/TCP/UDP Checksum
@straker
straker / README.md
Last active April 26, 2024 09:17
Basic Pong HTML and JavaScript Game

Basic Pong HTML and JavaScript Game

This is a basic implementation of the Atari Pong game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Score
  • When a ball goes past a paddle, the other player should score a point. Use context.fillText() to display the score to the screen
@zeljic
zeljic / build_sqlite3_lib.md
Last active May 20, 2024 18:23
Build SQLite3 .lib file on windows

How to build SQLite3 .lib file on Windows 10

  1. Download source from source

    For example: source https://www.sqlite.org/2023/sqlite-amalgamation-3430100.zip

  2. Download binary from binary

    For example: binary https://www.sqlite.org/2023/sqlite-dll-win64-x64-3430100.zip

  3. Extract both archives to the same directory

@willnode
willnode / ffmpeg-compress-mp4.bat
Last active March 10, 2022 22:45 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG (batch script for whole .mp4 in folder)
for %%v in (*.mp4) do ffmpeg -i "%%v" -vcodec h264 -b:v 800k -acodec mp3 "compress/%%v"
@LotteMakesStuff
LotteMakesStuff / 1.md
Last active January 5, 2023 20:54
UPM: How to make a custom package

UPM: How to make a custom package So, Unity has this shiny new package manager, and you have code you want to share between projects - wouldn't it be great if we could bundle up our shared code and plug it into all the projects that need it? Let's figure out how to make our own Package!


Todo

  • Modify the project manifest
  • Make a package manifest
  • Package the manifest up with some test code
  • Try it out in Unity!

@erikstorm
erikstorm / ffmpeg-compress-mp4
Last active March 9, 2018 06:07 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -b:v 800k -acodec mp3 output.mp4
@lanedraex
lanedraex / listener.rs
Created November 5, 2017 09:12
Rust UDP socket: send and receive
use std::net;
use std::env;
fn listen(socket: &net::UdpSocket, mut buffer: &mut [u8]) -> usize {
let (number_of_bytes, src_addr) = socket.recv_from(&mut buffer).expect("no data received");
println!("{:?}", number_of_bytes);
println!("{:?}", src_addr);