Skip to content

Instantly share code, notes, and snippets.

View brainplot's full-sized avatar
🏠
Working from home

Gianluca Recchia brainplot

🏠
Working from home
View GitHub Profile
@awesomekling
awesomekling / enumeration-macros.md
Created May 24, 2020 11:41
Preprocessor enumeration macros in C and C++

Here's a trick to avoid repeating a list of things in multiple places:

#define ENUMERATE_THINGS \
    ENUMERATE_THING(Foo) \
    ENUMERATE_THING(Bar) \
    ENUMERATE_THING(Baz)

#define ENUMERATE_THING(thing) thing
ENUMERATE_THINGS
@mklement0
mklement0 / Out-FileUtf8NoBom.ps1
Last active December 23, 2022 15:30
PowerShell function that emulates Out-File for creating UTF-8-encoded files *without a BOM* (byte-order mark).
<#
Prerequisites: PowerShell version 3 or above.
License: MIT
Author: Michael Klement <mklement0@gmail.com>
DOWNLOAD and DEFINITION OF THE FUNCTION:
irm https://gist.github.com/mklement0/8689b9b5123a9ba11df7214f82a673be/raw/Out-FileUtf8NoBom.ps1 | iex
The above directly defines the function below in your session and offers guidance for making it available in future
@soarez
soarez / ca.md
Last active April 22, 2024 03:01
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@rxaviers
rxaviers / gist:7360908
Last active May 1, 2024 10:52
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: