Skip to content

Instantly share code, notes, and snippets.

View mufidu's full-sized avatar
⛱️
Exploring around

Muhammad Mufid Utomo mufidu

⛱️
Exploring around
View GitHub Profile
@turnercore
turnercore / stop-youtube-play-on-load.js
Last active December 21, 2024 09:30
Stop YouTube Play on Load
(() => {
let isVideoHandled = false; // Flag to indicate if the video has been handled
const checkVideoStart = () => {
const video = document.querySelector('#movie_player > div.html5-video-container > video');
if (!video) return;
// When the video starts playing (currentTime changes from 0), pause it
if (video.currentTime > 0 && !video.paused) {
video.pause();
@Steveplays28
Steveplays28 / distant_horizons_shader_compatibility_information.md
Last active March 2, 2025 18:28
Distant Horizons shader compatibility info

Distant Horizons shader compatibility information

Distant Horizons v2.0.0 (and up) shader compatibility information.

v2

Install guide

Fabric

@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active March 3, 2025 03:18
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@MikeTheGreat
MikeTheGreat / nosleep.sh
Last active June 5, 2024 06:15
Disable sleep on any Mac
# Useful to prevent Macbooks to go to sleep when closing the lid instead of running tools that requires a Kernel Extension (e.g. InsomniaX) and more
#
# References:
# https://www.unix.com/man-page/osx/1/pmset/
# https://www.unix.com/man-page/osx/8/caffeinate/
# To stop sleep for a command: ######################
caffeinate -disu make
# To permanently change sleep settings: ######################
@kinoute
kinoute / get-md-images.sh
Last active June 11, 2023 11:33
Download remote images from markdown/jupyter notebooks files and update paths from remote to local.
#!/bin/bash
###################################################################
# Script Name : get-md-images.sh
# Description : Download all remote images written as markdown
# in our files and replace URLs by local path.
# Author : Yann Defretin
# Email : [email protected]
###################################################################
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active February 28, 2025 06:31
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@davidgilbertson
davidgilbertson / http2.js
Last active February 22, 2025 22:22
HTTP2 server with compression and caching
const http2 = require('http2');
const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const brotli = require('brotli'); // npm package
const PORT = 3032;
const BROTLI_QUALITY = 11; // slow, but we're caching so who cares
const STATIC_DIRECTORY = path.resolve(__dirname, '../dist/');
const cache = {};

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by