Skip to content

Instantly share code, notes, and snippets.

@Icohedron
Icohedron / Nix Flake for LLVM and Clang - HLSL SPIR-V and DirectX development.md
Last active June 29, 2025 04:38
Nix flake and nix shell for building LLVM and Clang for HLSL, DirectX, and SPIR-V

Have the following folder structure

  llvm-project/           <--- can be named anything
    ...
    shell.nix
  llvm-flake/
    flake.nix
    flake.lock
@Icohedron
Icohedron / shell.nix
Created January 26, 2025 08:34
shell.nix for building LLVM with clang, lld, and ccache
with import <nixpkgs> {};
# Use magic incantation to enable native compilation with clang & lld
mkShell.override { stdenv = overrideCC llvmPackages.stdenv (llvmPackages.stdenv.cc.override { inherit (llvmPackages) bintools; }); } {
name = "llvm-env";
buildInputs = [
python3
ninja
ccache
cmake
zlib
/**
* As the current user (borrower), request a book from another user
* @param isbn isbn of the book to request
* @param id id of the user to request to
* @return a CompletableFuture signifying the success/failure of this operation
*/
public CompletableFuture<Void> requestBook(@NonNull String isbn, @NonNull String id) {
final CompletableFuture<Void> future = new CompletableFuture<>();
CompletableFuture<OwnedBook> getOwnedBook = getUserOwnedBook(id, isbn);
package ca.ualberta.CMPUT3012019T02.alexandria.controller;
import android.support.annotation.NonNull;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
package ca.ualberta.CMPUT3012019T02.alexandria;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.annotation.NonNull;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.firebase.storage.StorageReference;
import org.junit.Assert;
" Plugin installation
" Install plugins in ~/.config/nvim/plugged
call plug#begin('~/.config/nvim/plugged')
" vim-solarized8
Plug 'lifepillar/vim-solarized8'
" vim-airline
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory