Skip to content

Instantly share code, notes, and snippets.

View willnode's full-sized avatar

Wildan M willnode

View GitHub Profile
@eplord
eplord / disable_windows_defender_win11.bat
Created October 30, 2024 08:02
disable defender windows 11
:: How to Permanently Disable Windows Defender Antivirus in Windows 11
@Echo Off & Cls
net sess>nul 2>&1||(powershell start cmd -ArgumentList """/c %~0""" -verb Runas & exit)
:_Start
Cls & Mode CON LINES=11 COLS=60 & Color 0E &Title Created By FreeBooter
Echo.
Echo.
@willnode
willnode / redox_m1.md
Last active May 31, 2025 22:07
Build Redox OS in MacOS Apple Silicon

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

WIP -- This gist is being updated to match with the book but specifics to MacOS Apple Silicon for top DX. For native bootstrap follow another gist (also WIP)

Clone

cd ~/Document
git clone https://gitlab.redox-os.org/redox-os/redox
cd redox
@EhsanCh
EhsanCh / fpm_get_status.php
Created February 19, 2023 10:54
PHP-FPM real-time status page (Single file without the need for web server configuration)
<?php
// Upload to private url or implement authorization...
if (isset($_GET["json"])) {
header("Content-type: application/json");
exit(json_encode( fpm_get_status() ));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
@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];
@kaaquist
kaaquist / podman_macos.md
Last active April 19, 2025 13:43
Podman with docker-compose on MacOS.

Podman with docker-compose on MacOS.

Podman an alternative to Docker Desktop on MacOS

Getting podman installed and started is super easy.
Just use brew to install it.

> brew install podman

Now since podman uses a VM just like the Docker Client on MacOS we need to initialize that and start it.

@ciencia
ciencia / opcache.php
Created April 16, 2021 15:36
opcache status - Script to get a nice visualization of opcache status (memory available, consumed, dirty...) I don't remember from where I grabbed it, but I haven't coded it
<?php
define('THOUSAND_SEPARATOR',true);
if (!extension_loaded('Zend OPcache')) {
echo '<div style="background-color: #F2DEDE; color: #B94A48; padding: 1em;">You do not have the Zend OPcache extension loaded, sample data is being shown instead.</div>';
require 'data-sample.php';
}
class OpCacheDataModel
@sindresorhus
sindresorhus / esm-package.md
Last active June 2, 2025 03:14
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@david-hoze
david-hoze / checksum_calculation.md
Last active April 15, 2025 12:23
How to Calculate IP/TCP/UDP Checksum
@straker
straker / README.md
Last active May 19, 2025 06:22
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