Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
Discover gists
This file contains 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
declare -a elems=( | |
"a 1" | |
"b 2" | |
"c 3 word" | |
"d 4" | |
) | |
for elem in "${elems[@]}"; do | |
read -a strarr <<< "$elem" # uses default whitespace IFS | |
echo ${strarr[0]} ${strarr[1]} ${strarr[2]} |
This file contains 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
-- Licensed under the MIT License, Copyright (c) 2024 jack.ink | |
local function resume_with_error_check(thread: thread, ...: any): () | |
local success, message = coroutine.resume(thread, ...) | |
if not success then | |
print(string.char(27) .. "[31m" .. message) | |
end | |
end |
This file contains 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 is a documented version of the build.gradle file from RemotePreferences: | |
// https://github.com/apsun/RemotePreferences/blob/master/library/build.gradle.kts | |
// | |
// It aims to explain exactly WTF is going on when you inevitably copy-paste | |
// someone's build.gradle from the internet and can't figure out why it's not | |
// working. | |
// | |
// It contains, to the best of my knowledge, the best practices as of Oct 2023 for | |
// building an Android library and publishing it to OSSRH (Maven Central). | |
// |
Originally tweeted by Adam Wathan: https://twitter.com/adamwathan/status/1217864323466432516?lang=en
Codepen: https://codepen.io/adamwathan/pen/bGNxMpz?editors=1000
<div class="bg-gray-100 min-h-screen antialiased text-gray-900 p-6">
<div class="max-w-sm mx-auto">
<div class="">
This file contains 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
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb | |
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb |
- People have exactly one "official" full name.
- People have exactly one full name which they go by.
- People have, at this point in time, exactly one canonical full name.
- People have exactly N names, for any value of N.
- People’s names fit within a certain defined amount of space.
- People’s names do not change.
- People’s names are written in ASCII.
- People’s names are written in any single character set.
What this guide is for: This post details how to set up a Fortran development environment in Windows using Visual Studio Code (VS-Code) and the Intel Fortran compiler, ifort
.
We will be installing both Visual Studio as well as VS-Code. This is because we will be bootstrapping the debugger from Visual Studio for our development in VS-Code. We will also be installing the Intel Fortran compilers via the Intel oneAPI basekit and HPC toolkit.
- First, install Visual Studio 2022 Community edition: https://visualstudio.microsoft.com/vs/community/
- During installation, check the box for
Desktop development with C++
.
- During installation, check the box for
- Second, install the Intel oneAPI base toolkit: https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html
- Choose Windows and select the online installer.
This file contains 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
// | |
// MultiPartFormData.swift | |
// | |
import Foundation | |
/* Example Call site: */ | |
func upload(imageData: Data) async throws { | |
guard let url = URL(string: "https://example.com/upload") else { return } | |
var multipartFormData = MultipartFormData() |
NewerOlder