Skip to content

Instantly share code, notes, and snippets.

View El-Wumbus's full-sized avatar
🤔
Learning

Decator El-Wumbus

🤔
Learning
View GitHub Profile
# Important directories, relative to this Makefile
SRCDIR=src
INCDIR=include
OBJDIR=build/obj
DEPDIR=build/dep
# Main Target object/name
TARGETDIR=dist
TARGET=$(TARGETDIR)/someproject
@El-Wumbus
El-Wumbus / howgithub.md
Last active December 15, 2022 02:49
How to use GitHub to download code and executables

How to GitHub

What is GitHub

GitHub is a hosting platform for git repositories. It makes it easier to collaborate on, and share, source code of open source projects. There are other similar services:

  • GitLab
  • BitBucket

It boils down to personal philosophy really. In the same way Microkernel vs Monolithic kernel is.

Sysv init and it's derivatives over the years relies on the 'Unix way' of little independent and autonomous scripts that are created by individual maintainers to help boot strap services using an init daemon. Init has no intelligence though and will go through the provided scripts first come first served. This can cause locks and timeouts as services try to start before other services have completed. Over the years there has been attempts to streamline this dependency hell but only to a limited effect. The init scripts became more and more complex as more a more distros started diverging in what core services the needed to start up.

Systemd took a different approach it made a smarter init daemon that could do more than just run custom scripts. It built a framework with dependency at it's core. It took a standardised configuration file which is very easy to understand and made maintainers fill out the bare minim

#include <stdio.h>
int menu()
{
printf("Select a menu option\n Option one (1)\n Option two (2)\n Option 3 (3)\n");
int menuSelection;
printf("Selection: ");
scanf("%d", &menuSelection);
@El-Wumbus
El-Wumbus / Syntax Highlighting.c
Created January 26, 2022 03:21
The syntax highlighting keywords for Dedit
/* C/C++ Keywords */
"auto", "break", "case", "continue", "default", "do", "else", "enum",
"extern", "for", "goto", "if", "register", "return", "sizeof", "static",
"struct", "switch", "typedef", "union", "volatile", "while", "NULL",
"alignas", "alignof", "and", "and_eq", "asm", "bitand", "bitor", "class",
"compl", "constexpr", "const_cast", "deltype", "delete", "dynamic_cast",
"explicit", "export", "false", "friend", "inline", "mutable", "namespace",
"new", "noexcept", "not", "not_eq", "nullptr", "operator", "or", "or_eq",
"private", "protected", "public", "reinterpret_cast", "static_assert",
"static_cast", "template", "this", "thread_local", "throw", "true", "try",
@El-Wumbus
El-Wumbus / Decator-code.css
Created December 22, 2021 22:14
GitHub-like. Single Line. code blocks in css.
.code {
color: #fff;
background-color: #343d44;
border-radius: 10px;
border: 1px solid #cacaca;
line-height: 1.2em;
font: 12px Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
padding: 10px;
overflow: auto;
-webkit-border-radius: 3px;