Skip to content

Instantly share code, notes, and snippets.

View wallentx's full-sized avatar
:shipit:
ȋ̴͎ ̶̘͝u̷̥͆s̴͖̾ē̷̠ ̶̟̉a̴͙̕ŗ̸͆č̶̬ḣ̷̭ ̴̡̄b̷̳̒ẗ̷͍ẘ̴̡

William Allen wallentx

:shipit:
ȋ̴͎ ̶̘͝u̷̥͆s̴͖̾ē̷̠ ̶̟̉a̴͙̕ŗ̸͆č̶̬ḣ̷̭ ̴̡̄b̷̳̒ẗ̷͍ẘ̴̡
View GitHub Profile
-- The C compiler identification is GNU 13.1.1 -- The CXX compiler identification is GNU 13.1.1 -- The ASM compiler identification is GNU -- Found assembler: /usr/bin/cc
-- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features
-- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features
#!/bin/bash
# create a 'here document' that is code we compile and use to probe the card
cat << EOF > /tmp/cudaComputeVersion.cu
#include <stdio.h>
int main()
{
cudaDeviceProp prop;
cudaGetDeviceProperties(&prop,0);
int v = prop.major * 10 + prop.minor;
printf("Device Name: %s\n", prop.name);
#!/usr/bin/env bash
set -e
usage () {
echo "bbcuda <options>"
echo "-a No CPU affinity"
echo "-b Benchmark mode"
echo "-c [int] Number of plots to make"
echo "-h Help"
echo "-l Enable NUMA locality"
@wallentx
wallentx / getbuilds
Last active December 26, 2023 19:26
#!/usr/bin/env bash
set -euo pipefail
download_dir="."
TMPOUT=$(mktemp /tmp/tmpXXXXXXXXXX)
Coff='\e[0m' # Off
Green='\e[0;32m' # Green
Blue='\e[0;34m' # Blue
Yellow='\e[0;33m' # Yellow
[ 2%] Built target example
[ 4%] Built target options_test
[ 6%] Built target link_test
[ 8%] Built target uint128
[ 11%] Built target fse
[ 11%] Linking CXX shared module chiapos.cpython-311.so
[ 11%] Linking CXX executable ProofOfSpace
[ 81%] Built target Catch2
ld.lld: error: unable to find library -lstdc++fs
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
#!/usr/bin/env bash
set -e
TMPOUT=$(mktemp /tmp/tmpXXXXXXXXXX)
function shutdown() {
tput cnorm
rm "$TMPOUT"
}
#!/usr/bin/env bash
# https://www.tomshardware.com/news/data-storage-data-transfer-sperm-dna,14089.html
# nobody asked for this. I'm sorry :(
function convu() {
conv=$(units -o "%.14f" -f ~/.units.bytes $2 $3 | grep / | cut -f 2 -d " ")
echo -e ""$(echo "$1 / $conv" | bc)" $3s"
}
@wallentx
wallentx / gh-info-health.go
Last active May 10, 2023 18:34
Keybase bot that shows GitHub service health - this was generated by ChatGPT, so it might sorta work
package main
import (
"log"
"net/http"
"strings"
"github.com/PuerkitoBio/goquery"
"github.com/keybase/go-keybase-chat-bot/kbchat"
)
#!/usr/bin/env bash
set -e
# This will only work if you have debug logging
TMPOUT=$(mktemp /tmp/tmpXXXXXXXXXX)
TMPOUT2=$(mktemp /tmp/tmp2XXXXXXXXXX)
TMPOUT3=$(mktemp /tmp/tmp3XXXXXXXXXX)
TMPOUT4=$(mktemp /tmp/tmp4XXXXXXXXXX)
#!/usr/bin/env bash
TMPOUT=$(mktemp /tmp/tmpXXXXXXXXXX)
TMPOUT2=$(mktemp /tmp/tmp2XXXXXXXXXX)
TMPOUT3=$(mktemp /tmp/tmp3XXXXXXXXXX)
function shutdown() {
rm "$TMPOUT" "$TMPOUT2" "$TMPOUT3"
}