Skip to content

Instantly share code, notes, and snippets.

View FederAndInk's full-sized avatar

Ludovic J FederAndInk

  • Toulouse
  • 13:24 (UTC +01:00)
View GitHub Profile
@FederAndInk
FederAndInk / clang_index_print_test.cpp
Last active May 11, 2020 17:37
Printing test with clang index (IndexASTConsumer)
#include <clang/AST/RecursiveASTVisitor.h>
#include <clang/Frontend/CompilerInstance.h>
#include <clang/Frontend/FrontendActions.h>
#include <clang/Index/IndexDataConsumer.h>
#include <clang/Index/IndexingAction.h>
#include <clang/Tooling/CommonOptionsParser.h>
#include <clang/Tooling/Tooling.h>
#include <llvm/ADT/DenseMap.h>
#include <llvm/ADT/DenseMapInfo.h>
@FederAndInk
FederAndInk / inherited_ctor_using.cpp
Last active May 11, 2020 03:07
Exemple for clang index (inherited ctor with using)
struct S
{
S(int i) {}
};
struct SD : S
{
using S::S;
};
% ./build/libtooling_test test.cpp -- -std=c++17
Presumed: 2:8
Expansion: 2:8
Spelling: 2:8
Roles: Def
Kind: CXXRecord
name: S
2|struct S
^
@FederAndInk
FederAndInk / ccls_vscode_conf.json
Last active December 16, 2021 19:50
ccls vscode config
"C_Cpp.autocomplete": "Disabled",
"C_Cpp.errorSquiggles": "Disabled",
"C_Cpp.intelliSenseEngine": "Disabled",
"ccls.cache.directory": "${workspaceFolder}/.vscode/.ccls-cache/",
"ccls.misc.compilationDatabaseDirectory": "${workspaceFolder}/build",
"ccls.codeLens.localVariables": true,
"ccls.completion.caseSensitivity": 1,
"ccls.completion.enableSnippetInsertion": true,
"ccls.highlight.enum.face": [
"enabled",
@FederAndInk
FederAndInk / latest.log
Created March 10, 2022 22:04
latest.log AQM2 v2.1 botania killing companion bat
[22:21:40] [main/INFO]: Loading Minecraft 1.18.1 with Fabric Loader 0.13.3
[22:21:40] [ForkJoinPool-1-worker-3/WARN]: The mod "lank" contains invalid entries in its mod json:
- Unsupported root entry "pack_format" at line 14 column 18
[22:21:40] [ForkJoinPool-1-worker-7/WARN]: The mod "jump" contains invalid entries in its mod json:
- Unsupported root entry "pack_format" at line 14 column 18
[22:21:40] [ForkJoinPool-1-worker-3/WARN]: The mod "libcd" contains invalid entries in its mod json:
- Unsupported root entry "licence" at line 9 column 12
[22:21:40] [ForkJoinPool-1-worker-5/WARN]: The mod "libcd" contains invalid entries in its mod json:
- Unsupported root entry "licence" at line 8 column 12
[22:21:41] [main/INFO]: Dependencies overridden for crusade, kubejs, disenchanter, ezpas, incantationem, quarryplus, trinkets, fuelinfo, bettersleeping, morevillagers-fabric, lambdabettergrass, mcdar, fabric-dimensions-v1, kibe, rad, betternether, apoli, megane, torohealth, adventurez, agape_space, villager-hats, re
---select the first non empty slot that is not bone_meal
---@return boolean
local function first_not_bone_meal()
local i = 1
while i <= 16 and
(turtle.getItemCount(i) == 0 or turtle.getItemDetail(i).name ==
"minecraft:bone_meal") do
i = i + 1
end
if i <= 16 then
---select the first non empty slot
---@return boolean
local function first_resource()
local i = 1
while i <= 16 and turtle.getItemCount(i) == 0 do
i = i + 1
end
if i <= 16 then
turtle.select(i)
end
---select the first non empty slot that is not bone_meal
local function first_nonempty_slot()
local i = 1
while i <= 16 and (turtle.getItemCount(i) == 0) do
i = i + 1
end
if i <= 16 then
turtle.select(i)
end
return i <= 16
@FederAndInk
FederAndInk / .ccls
Created April 30, 2022 19:14
.ccls file for arm toolchain
%compile_commands.json
--target=arm-none-eabi
%h -x
%h c++-header
%cpp -std=c++14
%hpp
-isystem/usr/arm-none-eabi/include/c++/11.3.0
-isystem/usr/arm-none-eabi/include/c++/11.3.0/arm-none-eabi
-isystem/usr/arm-none-eabi/include/c++/11.3.0/backward
-isystem/usr/lib/gcc/arm-none-eabi/11.3.0/include
@FederAndInk
FederAndInk / keybindings.json
Created December 24, 2022 08:12
my vscode keybindings
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+shift+alt+meta+c",
"command": "editor.action.blockComment",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+a",
"command": "-editor.action.blockComment",