Skip to content

Instantly share code, notes, and snippets.

View SamuelMarks's full-sized avatar
:octocat:
C > Rust > Go > TypeScript > C++

Samuel Marks SamuelMarks

:octocat:
C > Rust > Go > TypeScript > C++
View GitHub Profile
@SamuelMarks
SamuelMarks / rfc.md
Last active October 9, 2023 19:43
[RFC] Create a PostgreSQL package manager for extensions

Need

  • Too many new extensions cropping up
  • They each have different support matrix
  • Upgrade cycles

Feature wishlist

@SamuelMarks
SamuelMarks / rocm.md
Last active July 24, 2023 03:38 — forked from rigtorp/rocm.md
How to build rocm 3.6.x beta from source

Install rocm-cmake

git clone --depth=1 https://github.com/RadeonOpenCompute/rocm-cmake.git && \
mkdir 'rocm-cmake/build' && pushd "$_" && \
cmake -DCMAKE_INSTALL_PREFIX='/opt/rocm' .. && \
cmake --build . && \
sudo cmake --install . && \
popd
fd -HIFtd '.git' -x env -i GIT_WORK_TREE={} GIT_DIR={} /usr/local/bin/git log --pretty=format:"%ad - %an: %s" --after="2022-06-30" --until="2022-07-01" --author="Samuel Marks" 2>/dev/null
This file has been truncated, but you can view the full file.
/usr/bin/cmake -S/ROCm/ROCm-CompilerSupport/lib/comgr -B/ROCm/ROCm-CompilerSupport/lib/comgr/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /ROCm/ROCm-CompilerSupport/lib/comgr/build/CMakeFiles /ROCm/ROCm-CompilerSupport/lib/comgr/build//CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/ROCm/ROCm-CompilerSupport/lib/comgr/build'
make -f CMakeFiles/bc2h.dir/build.make CMakeFiles/bc2h.dir/depend
make[2]: Entering directory '/ROCm/ROCm-CompilerSupport/lib/comgr/build'
cd /ROCm/ROCm-CompilerSupport/lib/comgr/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /ROCm/ROCm-CompilerSupport/lib/comgr /ROCm/ROCm-CompilerSupport/lib/comgr /ROCm/ROCm-CompilerSupport/lib/comgr/build /ROCm/ROCm-CompilerSupport/lib/comgr/build /ROCm/ROCm-CompilerSupport/lib/comgr/build/CMakeFiles/bc2h.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/ROCm/ROCm-CompilerSupport/lib/comgr/build'
from io import StringIO
from json import dumps
from itertools import repeat
from collections import namedtuple
from pprint import PrettyPrinter
import psycopg2
import psycopg2.sql
import numpy as np
@SamuelMarks
SamuelMarks / CMakeLists.txt
Created September 18, 2022 14:06
CMake hacks to create a Bundle for macOS
if (BUILD_APPLE_BUNDLE)
set(EXEC_NAME "MyUI")
else ()
get_filename_component(EXEC_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
string(APPEND EXEC_NAME "-${PROJECT_VERSION}")
endif ()
set(Source_Files "main.c")
source_group("Source Files" FILES "${Source_Files}")
@SamuelMarks
SamuelMarks / DOMAIN.conf
Created September 3, 2022 19:26
nginx conf for Jupyter Notebook
# /etc/nginx/sites-enabled/DOMAIN.conf
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name DOMAIN_NAME;
@SamuelMarks
SamuelMarks / main.c
Last active February 14, 2022 03:41
Experiments with simple HTTP socket server in C
#include "server_attempt_6.c"
/* just a hack for this gist^, for attempts 0-5 see revision <17 */
int main(void) {
int code;
char *response = calloc(PIPE_BUF + 1, sizeof(char));
if (response == NULL) {
const int _code = fputs("OOM", stderr);
if (_code == EOF) exit(_code);
exit(EAI_MEMORY);
@SamuelMarks
SamuelMarks / Proposal.md
Created July 20, 2021 04:21
Decentralised game console

Project proposal

Multiple phones + TV gaming.

Why

You arrive at a mate's place and they don't have a console. But. You. Must. Game.

(also who wants to buy a console?)

#ifndef VERSIONS_EXPORT_H
#define VERSIONS_EXPORT_H
#ifdef VERSIONS_STATIC_DEFINE
# define VERSIONS_EXPORT
# define VERSIONS_NO_EXPORT
#else
# ifndef VERSIONS_EXPORT
# ifdef versions_EXPORTS