float('inf')
float('-inf')
# ^+-*/ and ><= etc work as expected, can lead to nan (e.g. inf-inf)Last updated March 13, 2024
This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.
Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG | |
| # PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT. | |
| # | |
| # | |
| # Libraries and infrastructure | |
| sudo apt update -y | |
| sudo apt install -y \ | |
| docker.io docker-buildx \ | |
| build-essential pkg-config autoconf bison rustc cargo clang \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Net.Http; | |
| namespace UrlDownloader; | |
| public class Downloader | |
| { | |
| private readonly string _downloadPath = "downloads"; | |
| private readonly HttpClient _httpClient; | |
| private readonly SemaphoreSlim _semaphore; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let isvowel c = | |
| c = 'a' || c = 'e' || c = 'i' || c = 'o' || c = 'u';; | |
| let isconsonant c = not (isvowel c);; | |
| let rec factorial n = | |
| if n <= 0 then 1 | |
| else n * factorial (n - 1);; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| export PATH=/usr/bin:/bin:/usr/sbin:/sbin | |
| # Create subfolder to store renamed files | |
| createDestination() { | |
| destination="$(dirname "$file")/sorted" | |
| mkdir -p "$destination" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # See explanation of linters at https://golangci-lint.run/usage/linters/ | |
| linters: | |
| disable-all: true | |
| enable: | |
| - bodyclose | |
| # Disabled due to flakes: https://github.com/sourcegraph/sourcegraph/issues/33183 | |
| # - depguard | |
| - forbidigo | |
| - gocritic | |
| - goimports |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| class Program { | |
| static void Main(string[] args) { | |
| var name = "Microsoft"; | |
| Console.WriteLine($"Hello, {name}!"); | |
| } | |
| } |
NewerOlder