Skip to content

Instantly share code, notes, and snippets.

View navhaxs's full-sized avatar

Jeremy Wong navhaxs

View GitHub Profile
@ehsan18t
ehsan18t / processor-boost-mode.md
Last active July 1, 2024 22:26
Enable Processor Boost Mode Control in Advanced Power Settings

Enable Processor Boost Mode Control in Windows

Disable Turbo Boost to Reduce Power Consumption and Heat

Why Do We Need It?

The thing is if your laptop cpu is getting really hot and you are trying to undervolt it then chances are 99% that there are no method to do so. I have also tried to do undervolt my Ryzen 7 5800H but no luck. Because the bios doesn't allow that much control over the cpu. I don't know the specific reasons for the manufactures to restrict such a great thing. But with this you can disable the Turbo Boost. While this might sounds stupid but trust me you won't see a massive difference in performance after turned it off.

When You should Do It?

@dbrookman
dbrookman / build-mpv_silicon.sh
Last active July 26, 2024 08:14
How to build mpv & mpv.app on an Apple silicon Mac
#!/usr/bin/env bash
# Builds mpv & mpv.app on Apple silicon Macs.
# Run this script from the root directory of the mpv repo.
# if anything fails, gtfo
set -ex
meson setup build
meson compile -C build
  1. Insert the unifying receiver.
  2. Download and Install the latest Unifying Receiver software. (version 250, firmware 024.010.00036 at time of writing)
  3. Download and Install the latest SetPoint software. (version 6.69.126, firmware 041.001.00038 at time of writing)
  4. Sync the T650 to your unifying receiver.
  5. Open SetPoint and make any changes to the SetPoint configuration for your T650.
    • You may need to restart the T650 and SetPoint for initial detection.
  6. Exit/close the SetPoint software (make sure it is fully closed and not in the tasktray)
  7. Open the Properties for C:\Program Files\Logitech\SetPointP\SetPoint.exe
@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
@ruanbekker
ruanbekker / tree_style_tab_firefox.md
Created November 28, 2019 06:18
Hide Native Tabs with Tree Style Tabs for Firefox
@postazure
postazure / pairing.zsh-theme
Created June 12, 2019 20:35
oh-my-zsh theme that includes the git authors from git-duet
# Save me here -> ~/.oh-my-zsh/themes/pairing.zsh-theme
# Git Authors
prompt_git_name() {
if $(git config --get duet.env.git-author-name >/dev/null 2>&1); then
prompt_git_duet_name
else
prompt_git_normal_name
fi
}
@leoheck
leoheck / fix-ubuntu-18.10-on-dell-xps-9570
Last active December 17, 2022 11:11
Fix Ubuntu 18.10 on Dell XPS 9570
#
# Run this from the Live USB.
#
#############################
# EDIT YOUR PARTITIONS HERE #
#############################
root_partition=/dev/nvm0n1p2
sudo mount ${root_partition} /mnt
@sonipb
sonipb / ultimate-guide-to-woocommerce-checkout-fields.html
Last active December 16, 2021 01:19
woocommerce checkout page : Ultimate Guide to WooCommerce Checkout Fields
// ref. https://jeroensormani.com/ultimate-guide-to-woocommerce-checkout-fields/
//This post is meant as a one stop shop if you’d like to make any kind of customizations to your WooCommerce checkout fields. Whether this is adding additional fields, removing some unneeded ones or changing the order they’re displayed in.
This post is meant as a one stop shop if you’d like to make any kind of customizations to your WooCommerce checkout fields. Whether this is adding additional fields, removing some unneeded ones or changing the order they’re displayed in.
Additionally there will be guides on how do display fields two field side by side, updates the order totals when a field changes and how to add basic field validation.
This is a post with a lot of code snippets and likely requires changes for it to fit your exact needs. Prefer to use a plugin instead? Take a look at my Advanced Checkout Fields for WooCommerce plugin.
Good to Know
These are some good to know files, hooks and functions/methods. Some of these
@Thomasvdam
Thomasvdam / soundCloudPlaylist.js
Last active October 9, 2023 18:45
Copy SoundCloud playlist items from one to another.
// Configuration
const WAIT_OPEN_PLAYLIST_POPUP = 1000;
const WAIT_AFTER_ADD_PLAYLIST = 1500;
const TARGET_PLAYLIST_NAME = 'To Do';
// Should the new playlist be in reverse order?
const REVERSE = false;
// Should liked items be skipped?
const SKIP_LIKED = true;
@GhazanfarMir
GhazanfarMir / Instructions.sh
Last active May 14, 2024 03:26
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa