Skip to content

Instantly share code, notes, and snippets.

View navossoc's full-sized avatar
🍕
It's always a good time for pizza

Rafael Cossovan navossoc

🍕
It's always a good time for pizza
View GitHub Profile
#!/bin/bash
set -eu
LATEST=$(curl -fsL https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)
echo "Latest version: $LATEST"
echo
VERSION=${VERSION:-$LATEST}
#!/bin/bash
set -eu
LATEST=$(curl -fsL https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)
echo "Latest version: $LATEST"
echo
VERSION=${VERSION:-$LATEST}
#!/bin/bash
set -eu
LATEST=$(curl -fsL https://golang.org/VERSION?m=text)
LATEST=$(echo $LATEST | sed -r 's/go([0-9.]+) time.*\b/\1/')
echo "Latest version: $LATEST"
echo
VERSION=${VERSION:-$LATEST}
#!/bin/bash
# mirror list
#wget -qO - mirrors.ubuntu.com/mirrors.txt
# replace apt-get mirror's with a country mirror
sed -i -E 's/deb(-src)? http:\/\/.+\/\b/deb\1 http:\/\/br.archive.ubuntu.com\//' /etc/apt/sources.list
# mirror protocol
# sed -E 's/deb(-src)? http:\/\/.+ /deb\1 mirror:\/\/mirrors.ubuntu.com\/mirrors.txt /' /etc/apt/sources.list
### Keybase proof
I hereby claim:
* I am navossoc on github.
* I am navossoc (https://keybase.io/navossoc) on keybase.
* I have a public key ASDMYAQTlsVPXRtGmosSbKDNBo0GoEUqutxUx20_gUBjlQo
To claim this, I am signing this object:
@navossoc
navossoc / win7-sha2-KB3033929.c
Last active November 2, 2018 09:18
Check if SHA-2 support is available on Windows 7 SP1 (KB3033929)
BOOL IsSHA2Supported()
{
// Get a handle to the DLL module
HMODULE hLib = LoadLibraryA("wintrust.dll");
// If the handle is valid, try to get the function address
if (hLib != NULL)
{
PVOID fpCryptCATAdminAcquireContext2 = GetProcAddress(hLib, "CryptCATAdminAcquireContext2");