Skip to content

Instantly share code, notes, and snippets.

View Adhjie's full-sized avatar
🎯
Focusing

Adi Adhjie

🎯
Focusing
View GitHub Profile
@jpflouret
jpflouret / README.md
Last active March 20, 2025 04:17
paste.exe

Pipe contents of windows clipboard to another command

Usage

To pipe the contents of the clipboard to another command (e.g. grep):

paste | grep pattern

To save the contents of the clipboard to a file:

@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active April 23, 2025 10:52
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@0XDE57
0XDE57 / config.md
Last active April 22, 2025 18:51
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@AgentOak
AgentOak / youtube_formats.md
Last active April 20, 2025 23:32
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
@ryandaniels
ryandaniels / firefox-user.js
Last active December 13, 2024 10:53
Firefox user.js privacy and optimization settings
/*
* Open profile dir - find in about:support or about:profiles
* Copy this file into your profile directory.
* Add changes to this file. Save file.
* Restart Firefox. Below overrides will be loaded.
* Close Firefox and open prefs.js to confirm changes merged there.
* NOTE: only non-default values will be saved to prefs.js
*
*/
@DuckTeamOfficial
DuckTeamOfficial / WindowsStoreApps
Last active October 24, 2024 07:27
Remove or Reinstall Windows Store Apps on Windows 10
Note: Run PowerShell as Administrator!
Delete all builtin apps except photo viewer and calculator (xbox will throw error as game bar is not removed but everything else is!);
Get-AppxPackage -allusers *3dbuilder* | Remove-AppxPackage
Get-AppxPackage -allusers *alarms* | Remove-AppxPackage
Get-AppxPackage -allusers *appconnector* | Remove-AppxPackage
Get-AppxPackage -allusers *appinstaller* | Remove-AppxPackage
Get-AppxPackage -allusers *communicationsapps* | Remove-AppxPackage
Get-AppxPackage -allusers *camera* | Remove-AppxPackage
@AveYo
AveYo / @ batch scripts for power users.md
Last active April 13, 2025 13:35
Windows batch scripts for power users

windows_update_toggle.bat v10.1 final
~ one script to rule them all!
~ block build upgrades and/or automatic updates without breawking Store downloads and Defender protection updates
~ there is a lot of focus on Defender updates working independently, unlike any other updates "management" solution
~ ifeo safe blocking with no destructive changes of ownership, deleting files, removing tasks, or over-blocking
~ toggle everything from the Desktop right-click context menu!
but wait, there is more:
~ hide/unhide/install update lists with counter at the Desktop right-click context menu!

Previous update toggle batch suite scripts have been overwritten on pastebin, but will still be available here:

@borekb
borekb / README.md
Last active November 15, 2024 23:41
Docker and Git Bash / MSYS2 on Windows: path conversion workaround

👋 Moved to https://github.com/borekb/docker-path-workaround


Docker in Git Bash / MSYS2 on Windows: path conversion workaround

UPDATE 07/2018: I switched from Git Bash to MSYS2 recently which should be very similar, if not the same, but there some subtle differences which made me realize this is more tricky than I thought and that I don't 100% understand what is going on. If someone can help, please let me know in the comments.

Invoking docker in MSYS2 shell or Git Bash typically fails with complains about paths, for example:

@ricardojba
ricardojba / windows_hardening.cmd
Last active April 23, 2025 10:35
A Windows hardening script
::##########################################################################################################################
::
:: This script can ruin your day, if you run it without fully understanding what it does, you don't know what you are doing,
::
:: OR BOTH!!!
::
:: YOU HAVE BEEN WARNED!!!!!!!!!!
::
:: This script is provided "AS IS" with no warranties, and confers no rights.
:: Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section,
@davydka
davydka / WSL+X11.md
Last active February 9, 2025 02:18
X11 setup for Windows Susbsytem for Linux (WSL)
  • Open Powershell as Administrator and run: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • Open the Microsoft Store, search for Ubuntu, and install
  • Launch Ubuntu and create your Linux user
  • Open a shell into WSL (I like cmder so far: http://cmder.net/)
  • In Windows, download and install MobaXterm (free version): https://mobaxterm.mobatek.net/download.html
  • Make sure X server is running
    • You’ll always need to run MobaXterm, and in the top right corner of the app there’s an "X server" button. Make sure it’s running.
    • In mobaxterm settings -> x11 -> set OpenGL Acceleration to: Hardware
  • WSL won't have a display environment variable set by default, so tell it manually to connect to the first display: export DISPLAY=:0.0
  • Test an x11 app: sudo apt-get install x11-apps