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
# Created with: $ diagtool tree | |
-Wall | |
-Wextra | |
-Wpedantic | |
-Warray-bounds-pointer-arithmetic | |
-Wbind-to-temporary-copy | |
-Wcalled-once-parameter | |
-Wcast-align |
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
# From ~/projects/llvm-project/ | |
# "compiler-rt" is needed so that you can link against it, otherwise you'll get errors when using -fsanitizer about libclang_rt.san | |
$ cmake -S llvm -B build -G Ninja \ | |
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb" \ | |
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi" \ | |
-DLLVM_TARGETS_TO_BUILD=X86 \ | |
-DLLVM_INCLUDE_TESTS=OFF \ | |
-DLLVM_CCACHE_BUILD=ON \ | |
-DLLVM_USE_LINKER=mold \ | |
-DCMAKE_BUILD_TYPE=Release \ |
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
version: "3.6" | |
services: | |
postgres: | |
image: postgres:15 | |
restart: always | |
volumes: | |
- db_data:/var/lib/postgresql/data | |
- type: bind | |
source: ./docker/postgres/chinook.sql |
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
int main(int argc, char** argv) | |
{ | |
seastar::sharded<buffer_pool_service> buffer_pool_service; | |
seastar::app_template app; | |
app.add_options()( | |
"db-file", boost::program_options::value<std::string>()->default_value("db.dat"), "Database file"); | |
return app.run(argc, argv, [&] -> seastar::future<int> { | |
seastar::engine().at_exit([&buffer_pool_service] { return buffer_pool_service.stop(); }); |
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
BasedOnStyle: Microsoft | |
ColumnLimit: 120 | |
PointerAlignment: Left | |
AlwaysBreakTemplateDeclarations: Yes | |
SortIncludes: CaseSensitive | |
AlignArrayOfStructures: Right | |
AlignConsecutiveAssignments: Consecutive | |
AlignConsecutiveBitFields: Consecutive |
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
const std = @import("std"); | |
const PAGE_SIZE = 4096; | |
const BUFFER_POOL_NUM_PAGES = 1000; | |
///////////////////////// | |
// DISK MANAGER | |
///////////////////////// | |
const IoUringDiskManager = struct { |
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
@ApplicationScoped | |
public class PersonRepositoryAsyncAwait { | |
@Inject | |
PgPool pgPool; | |
public Person findById(Long id) { | |
RowSet<Row> rowSet = pgPool | |
.preparedQuery("SELECT id, name, age, gender FROM person WHERE id = $1") | |
.executeAndAwait(Tuple.of(id)); |
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
class IoUringExample { | |
private static int QUEUE_DEPTH = 8; | |
private static MemorySession session = MemorySession.global(); | |
private static GroupLayout myStructLayout = MemoryLayout.structLayout( | |
Constants.C_INT.withName("foo"), | |
Constants.C_INT.withName("bar")); | |
private static VarHandle myStruct$foo = myStructLayout.varHandle(MemoryLayout.PathElement.groupElement("foo")); | |
private static VarHandle myStruct$bar = myStructLayout.varHandle(MemoryLayout.PathElement.groupElement("bar")); |
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
$ ctags --language-force=C -x --_xformat="%N:%{typeref}:%{signature}" --kinds-C=p libfoo.h |
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
FROM quay.io/fedora/fedora:38 | |
# Install requirements for building OpenJDK from source | |
RUN dnf install -y \ | |
file \ | |
diffutils \ | |
alsa-lib-devel \ | |
cups-devel \ | |
fontconfig-devel \ | |
freetype-devel \ |