Skip to content

Instantly share code, notes, and snippets.

View gracicot's full-sized avatar
🎯
Focusing

Guillaume Racicot gracicot

🎯
Focusing
  • MongoDB
  • Montréal
View GitHub Profile
@gracicot
gracicot / gist:e1a778ef067ea1749ddcffc2f7cbffd1
Created September 9, 2024 15:11
nix log /nix/store/h2s8k295blscnwcm9rx8iakr9qcfnjyn-compiler-rt-19.1.0-rc3.drv
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/50840r2bg3aa12x05b499xlmf1f7asi6-compiler-rt-src-19.1.0-rc3
source root is compiler-rt-src-19.1.0-rc3/compiler-rt
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
applying patch /nix/store/qvyl9jgm1a1mlix44qbsgrd1ipwciamk-X86-support-extension.patch
patching file lib/builtins/CMakeLists.txt
Hunk #1 succeeded at 377 (offset 29 lines).
Hunk #2 succeeded at 847 with fuzz 2 (offset 120 lines).
@gracicot
gracicot / workman-lvim.lua
Created October 6, 2022 01:29
My lunarvim workman keybindings
vim.cmd('source ~/.config/lvim/workman.vim')
-- unmap a default keymapping
lvim.keys.normal_mode["<C-h>"] = false
lvim.keys.normal_mode["<C-j>"] = false
lvim.keys.normal_mode["<C-k>"] = false
lvim.keys.normal_mode["<C-l>"] = false
lvim.keys.normal_mode["<S-l>"] = false
lvim.keys.normal_mode["<S-h>"] = false
lvim.keys.normal_mode["<S-y>"] = ":BufferLineCycleNext<CR>"
lvim.keys.normal_mode["<S-o>"] = ":BufferLineCyclePrev<CR>"
@gracicot
gracicot / workman.vim
Created October 6, 2022 01:28
My workman keybindings for vim (basic)
noremap n j
noremap e k
noremap y h
noremap o l
noremap j y
noremap k n
noremap h e
noremap l o
noremap N J
@gracicot
gracicot / userChrome.css
Created June 8, 2022 23:17
Firefox MacOS + Tree style tabs
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
/* Hide Horizontal TAB Bar */
/* Hide White Header Tab Tree */
#sidebar-header {
display: none;
}
#TabsToolbar {
min-height: 0 !important;
@gracicot
gracicot / murmur64a.hpp
Created October 8, 2021 01:01
Murmur64a (murmur2) constexpr implementation
#include <cstdint>
#include <cstddef>
#include <span>
[[nodiscard]]
constexpr auto murmur64a(std::span<std::byte const> buf, std::size_t seed) noexcept -> std::size_t {
auto constexpr m = std::uint64_t{0xc6a4a7935bd1e995ull};
auto constexpr r = int{47};
auto const length = buf.size();
@gracicot
gracicot / gist:b413a26849fadf3d4d36
Created April 22, 2015 03:38
Kangaru instance holder with void shared_ptr
struct InstanceHolder {
InstanceHolder() = default;
template <typename T>
explicit InstanceHolder(std::shared_ptr<T> ptr) : _ptr{ptr} {}
InstanceHolder(InstanceHolder &&other) noexcept : _ptr{std::move(other._ptr)} {}
InstanceHolder(const InstanceHolder &) = delete;
InstanceHolder& operator =(const InstanceHolder &) = delete;
InstanceHolder& operator =(InstanceHolder &&rhs) noexcept {
@gracicot
gracicot / gist:6723484
Last active December 24, 2015 01:29 — forked from lracicot/gist:6723475
#pragma once
#include "vector.h"
template<class T>
Vector<2, T>
{
public:
Vector(T _x = 0, T _y = 0) : x(_x), y(_y)
{