DoH queries resolve over HTTPS for privacy, performance, and security. DoH also makes it easier to use a name server of your choice instead of the one configured for your system.
| param( | |
| [Parameter(Mandatory)][string]$vmName | |
| ) | |
| $InformationPreference = "Continue" | |
| $ErrorActionPreference = "Stop" | |
| try { | |
| $vmPartitionAdapter = Get-VMGpuPartitionAdapter -VMName $vmName | |
| if ($vmPartitionAdapter) { | |
| Write-Information "Removing Partition Adapter. Checkpoints work." |
If you're encountering ping github.com failing inside WSL with a Temporary failure in name resolution, you're not alone — this has been a long-standing issue, especially when using VPNs or corporate networks.
This issue is now fixed robustly with DNS tunneling, which preserves dynamic DNS behavior and avoids limitations like WSL’s former hard cap of 3 DNS servers in /etc/resolv.conf.
DNS tunneling is enabled by default in WSL version 2.2.1 and later, meaning that if you're still seeing DNS resolution issues, the first and most effective fix is simply to upgrade WSL. Upgrading WSL updates the WSL platform itself, but does not affect your installed Linux distributions, apps, or files.
To upgrade WSL, follow these steps,
| import sys, os, time | |
| import tweepy | |
| #Credit to KonradIT on GithubGist for making the original script, tweet_from_fridge.py | |
| #I had only modified it so it can reply to tweets, nothing else. | |
| #All credit goes to the original author. | |
| keys = dict( | |
| consumer_key='put', | |
| consumer_secret='your', |
- This document is still a draft. Don't rely on any information until it is done and tested.
- This is a more advanced guide with some special cases, improvements and optimizations. If you need to know the basics, read this guide.
You can use cores PatchOperationFindMod to create conditional patches when certain mods are loaded without the need of an external library.
<Operation Class="PatchOperationFindMod">
<mods>| Log uploaded on Monday, October 22, 2018, 8:25:56 AM | |
| Loaded mods: | |
| Core: (no assemblies) | |
| HugsLib[6.0.1]: 0Harmony(1.2.0.1), HugsLib(1.0.0.0) | |
| Miscellaneous 'CORE': ColonistKeys(0.19.0.0), CommonMisc(0.19.0.0) | |
| JecsTools: 0Harmony(1.0.9.1), 0JecsTools(1.0.8.0), AbilityUser(1.18.0.0), AbilityUserAI(1.18.0.0), CompActivatableEffect(1.18.0.0), CompAnimated(1.18.0.0), CompBalloon(1.18.0.0), CompDeflector(1.18.0.0), CompDelayedSpawner(1.18.0.0), CompExtraSounds(1.18.0.0), CompInstalledPart(1.18.0.0), CompLumbering(1.18.0.0), CompOverlays(1.18.0.0), CompOversizedWeapon(1.18.0.0), CompSlotLoadable(1.18.0.0), CompToggleDef(1.18.0.0), CompVehicle(1.17.0.1), PawnShields(1.0.0.0) | |
| Mod Manager: 0ColourPicker(1.0.0.0), 0Harmony(1.2.0.1), ModManager(1.0.0.0) | |
| ModSync RW - 1.0: 0Harmony(1.2.0.1), ModSyncRW(1.0.0.0) | |
| Glitter Tech: (no assemblies) | |
| A Dog Said...: (no assemblies) |
| // ==UserScript== | |
| // @name GitHub Dark Script | |
| // @version 2.2.5 | |
| // @description GitHub Dark in userscript form, with a settings panel | |
| // @license MIT | |
| // @author StylishThemes | |
| // @namespace https://github.com/StylishThemes | |
| // @include /^https?://((gist|guides|help|raw|status|developer)\.)?github\.com((?!generated_pages\/preview).)*$/ | |
| // @include /^https://*.githubusercontent.com/*$/ | |
| // @run-at document-start |
There are 11 new "PatchOperation" actions we can perform to modify Defs without copying the whole thing. This in turn improves mod compatability dramatically - it allows two mods to modify different parts of the same Def without conflict. This guide only describes the basics of each operation available to us.
Patches go in xml files in a subfolder named "Patches" in your mod folder (So "MyMod\Patches", just like you might have "MyMod\Defs" or "MyMod\Textures"). Example.
Each PatchOperation has an "xpath" node, which should contain an xpath selector for the xml node(s) that the operation should affect. This is not an xpath tutorial. If you don't know xpath, not my problem. But minimurgle has you covered!
To illustrate the operations, I'll use this simple example def:
<DesignationCategoryDef>| <?xml version="1.0" encoding="utf-8"?> | |
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| <!-- #1 Place this line at the top of any msbuild script (ie, csproj, etc) --> | |
| <PropertyGroup><PowerShell># 2>nul || type %~df0|find /v "setlocal"|find /v "errorlevel"|powershell.exe -noninteractive -& exit %errorlevel% || #</PowerShell></PropertyGroup> | |
| <!-- #2 in any target you want to run a script --> | |
| <Target Name="default" > | |
| <PropertyGroup> <!-- #3 prefix your powershell script with the $(PowerShell) variable, then code as normal! --> | |
| <myscript>$(PowerShell) |
| javascript:(function(){var%20a=document.createElement("style");a.innerHTML=".publishedfile_popup_screenshot,.publishedfile_popup_screenshot>img,.profile_media_item,.imgWallItem{min-height:100px}",document.head.appendChild(a),[].forEach.call(document.getElementsByTagName("iframe"),function(e){e.contentDocument.head.appendChild(a.cloneNode(true))})})(); |