Skip to content

Instantly share code, notes, and snippets.

@GodSaveEarth
GodSaveEarth / wifi_and_vpn_shortcut_windows_10.md
Last active February 3, 2025 18:48
How to create a keyboard shortcut for Wifi and VPN connections on Windows 10

How to create a keyboard shortcut for Wifi and VPN connections on Windows 10

Either download a ready to use shortcut (save as, then rename to .lnk) or follow the instruction below.

https://gist.github.com/user-attachments/assets/feee1293-0e64-4810-bde6-3c154da1e44e network lnk

  1. Enter the so-called "God mode" by creating a new desktop folder named "GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}".
  2. Open the newly created shortcut and locate the "Connect to a network" item.
  3. Right-click it to create a desktop shortcut, then open shortcut properties and set a hotkey
@GodSaveEarth
GodSaveEarth / download-icloud-sharedalbum.ps1
Created November 15, 2024 20:47
PowerShell script to download hi-res photos from Apple iCloud sharedalbum
# PowerShell script to download hi-res photos from
# Apple iCloud sharedalbum
#
# The script saves jsons and txt to its directory for debug reasons
# Please remove them manually later
$target_url = "https://www.icloud.com/sharedalbum/#B1e5ZhN2vMlt0Z"
@GodSaveEarth
GodSaveEarth / PDFCreator fonts.reg
Created June 6, 2023 11:00
PDFCreator fonts vectorize (outlines)
[Computer\HKEY_CURRENT_USER\SOFTWARE\pdfforge\PDFCreator\Settings\ConversionProfiles\0\Ghostscript]
AdditionalGsParameters = -dNoOutputFonts
@GodSaveEarth
GodSaveEarth / firefox.txt
Created March 3, 2023 09:11
Firefox: Potential Security Risk. Always display "Advanced" panel by default
If you wish to always display Advanced panel when you meet the “Potential Security Risk” warning,
please go to about:config and set browser.xul.error_pages.expert_bad_cert = true
@GodSaveEarth
GodSaveEarth / Thunderbird_disable_updates.reg
Created November 9, 2020 06:20
Thunderbird 78 disable updates
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Thunderbird]
"DisableAppUpdate"=dword:00000001
@GodSaveEarth
GodSaveEarth / synerdocs_fix
Created May 3, 2020 07:58
Synerdocs translate
function fix_value(i,e) {
t = $(e).text();
t = t.replace(/Документ об отгрузке.+№/g, "УПД №");
$(e).text(t);
}
jQuery(".document-title>a").each(fix_value);
ffmpeg -i input.file -map 0:a:0 -b:a 96k output.mp3
@GodSaveEarth
GodSaveEarth / vk_extract_friends.js
Created February 3, 2020 08:31
Скопировать все id друзей с текущего экрана
x = document.getElementsByClassName("friends_field_title");
r = "";
for (i = 0; i < x.length; i++) {
a = x[i].getElementsByTagName("a")[0];
l = a.getAttribute("href").substr(1);
r += l + "<br>\n";
}
//console.log(r);
var myWindow=window.open(''); myWindow.document.write(r);
@GodSaveEarth
GodSaveEarth / fix
Last active December 24, 2019 12:12
<script src="//cdn.jsdelivr.net/gh/ilyabirman/Likely/release/likely.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/ilyabirman/Likely/release/likely.css">
<style>
.t746__imgwrapper {
/* спиннер на время загрузки */
background: url(//cdnjs.cloudflare.com/ajax/libs/design-system/2.9.4/images/spinners/slds_spinner_brand.gif) no-repeat center;
}
.t-slds__caption__container {
text-align: center; /* центрует соцкнопки */
}
@GodSaveEarth
GodSaveEarth / add_calendars.js
Created December 14, 2019 16:03
Add all public calendars to your Google calendar
// go to Add calendar -> Browse calendars of interest
// and execute in console
divs = document.querySelectorAll("div[role=checkbox][aria-checked=false]")
[].forEach.call(divs, function(div) {
div.click()
});