To pipe the contents of the clipboard to another command (e.g. grep):
paste | grep pattern
To save the contents of the clipboard to a file:
#!/usr/bin/env python3 | |
""" | |
Generate a Clang AST (in JSON format) from a compilation database. Adapted from | |
run-clang-format.py. | |
I use [bear](https://github.com/rizsotto/Bear) to generate the compilation | |
database. | |
Author: Adrian Herrera |
#include <utility> | |
#include <string> | |
#include <string_view> | |
using namespace std::literals; | |
// | |
template <class F, class... Args, | |
class = decltype(std::declval<F&&>()(std::declval<Args&&>()...))> |
// intel CPUID opcode | |
// see: https://en.wikipedia.org/wiki/CPUID | |
// clang -Wall -Wextra -std=c11 cpuinfo.c -o cpuinfo | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <cpuid.h> //macro __cpuid(eaxin, eaxout, ebx, ecx, edx) | |
int main() { | |
{ |