Skip to content

Instantly share code, notes, and snippets.

@tokmac
tokmac / fix-wsl2-dns-resolution
Created December 16, 2021 13:50 — forked from coltenkrauter/fix-wsl2-dns-resolution.md
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@tokmac
tokmac / gist:d7ea17ccc1e4ae12119ee333cd2682fc
Last active April 23, 2019 14:12
How to unstuck a cart?
How to unstuck a cart?
======================
1) First we find the id of the cart (can be get from the request made on the process cart page)
2) Second we look into [CartProcessStatus] table for records for this cart
select top 100 * from CartProcessStatus where CartId = {cartid}
From here we have two different cases depending on the the last record status code:
- Code < 35 - This mean we have never charged any payment. We should do the following
* Insert a step with a code = 100, stop=1
declare @areAutoshipsRunning int = (select top 1
case when r.[End] is null then 1 else 0 end
from RepeatableTaskRun r
join RepeatableTask rt on rt.TypeId = 2
where r.TaskId = rt.Id
order by r.id desc)
if @areAutoshipsRunning = 1
begin throw 51000,'autoships are rumnning',1 end
1. Check all configurations
- API
- WS
- EROQ
- IAA
2.1 Release WS
2.2 Release API
2.3 Release Configurations
3. Stop API from IIS
4. Migrate ES (change configs in App.config
Write-Host 'Please allow several minutes for the install to complete. '
# Install Google Chrome x64 on 64-Bit systems? $True or $False
$Installx64 = $True
# Define the temporary location to cache the installer.
$TempDirectory = "$ENV:Temp\Chrome"
# Run the script silently, $True or $False
Computer\HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command
"C:\Program Files (x86)\Microsoft VS Code\Code.exe" --disable-gpu "%V"
Computer\HKEY_CLASSES_ROOT\*\shell\VSCode\command
"C:\Program Files (x86)\Microsoft VS Code\Code.exe" --disable-gpu "%1"