Skip to content

Instantly share code, notes, and snippets.

View cromat's full-sized avatar

Tomislav Brabec cromat

View GitHub Profile
@cromat
cromat / Compile Redis with Cygwin.md
Last active June 30, 2021 15:37 — forked from pcan/README.md
Compile Redis with Cygwin

Prerequisites

Install Cygwin with make, gcc, g++ and tcl.
(If you use apt-cyg you can install them with apt-cyg install make, apt-cyg install gcc-core and apt-cyg install tcl
Download Redis tar.gz package, unpack it.

Patch

Edit deps/hiredis/net.c and add following line before include directives:

@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active April 30, 2024 09:07
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.
@raphw
raphw / run.sh
Last active February 18, 2024 08:48
Runs Mockito on Graal VM
#!/bin/bash
set -x
set -e
if [[ -z $1 ]]; then
echo "Specify location of Graal VM as first argument"
exit 1
fi
$1/bin/gu install native-image
rm -rf META-INF sample sample.build_artifacts.txt Sample.* *.jar
echo "public class Sample {