| <h2>jQuery and AJAX is FUN!</h2> | |
| <p id="p1">This is some text in a demo_test1.txt.</p> |
tl;dr: If you want to just know the method, skip to How to section
Clangd is a state-of-the-art C/C++ LSP that can be used in every popular text editors like Neovim, Emacs or VS Code. Even CLion uses clangd under the hood. Unfortunately, clangd requires compile_commands.json to work, and the only way to painlessly generate it is to use CMake.
But what if I tell you you can quickly hack your way around that, and generate compile_commands.json for any project, no matter how compilcated? I have used that way at work for years, originaly because I used CLion which supported only CMake projects - but now I use that method succesfully with clangd and Neovim.
Basically what we need to achieve is to create a CMake file that will generate a compile_commands.json file with information about:
| export EDITOR=vim | |
| export VISUAL=$EDITOR |
| #!/usr/bin/env node | |
| /** | |
| ******************************* | |
| * Copyright 2020 sytranvn * | |
| * License: MIT License * | |
| ******************************* | |
| */ | |
| const { exit } = require('process') | |
| const {promises } = require('fs') |
This is one way to pass some data (API tokens, etc.) to your Jekyll templates without putting it in your _config.yml file (which is likely to be committed in your GitHub repository).
Copy the environment_variables.rb plugin to your _plugins folder, and add any environment variable you wish to have available on the site.config object.
In a Liquid template, that information will be available through the site object. For example, _layouts/default.html could contain:
| #!/usr/bin/env bash | |
| # by Jamie Tanna | |
| python -c $'import json\nimport sys\nwith open(sys.argv[1], "r") as f: print(json.dumps(json.load(f)))' $1 |
| // v8/utils | |
| inline int HexValue(uc32 c) { | |
| c -= '0'; | |
| if (static_cast<unsigned>(c) <= 9) return c; | |
| c = (c | 0x20) - ('a' - '0'); // detect 0x11..0x16 and 0x31..0x36. | |
| if (static_cast<unsigned>(c) <= 5) return c + 10; | |
| return -1; | |
| } |
| #!/usr/bin/env sh | |
| # USAGE: transfer.sh [--ignore-existing] [user@]host[:port] <source> <destination> | |
| ie="" | |
| if [ "$1" = "--ignore-existing" ]; then | |
| ie="$1" | |
| shift | |
| fi |