What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-11-03 09:24:24
self documenting makefile
.PHONY: help help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' # All rules with double-hash comments will be automatically displayed in th... Add solution -
C 2021-11-01 23:31:06
c how to encrypt and decrypt
#include <stdio.h> #include <stdlib.h> #include <string.h> #define N 100 int main() { int switcho; do { printf("Criptare random: 1\nCriptare avendo valore: 2\nDecriptare: 3\nSalvati: 4\n\nScegliere: "); scanf("%d&q... Add solution -
Other 2021-10-17 06:19:10
variadic macros
// variadic_macros.cpp #include <stdio.h> #define EMPTY #define CHECK1(x, ...) if (!(x)) { printf(__VA_ARGS__); } #define CHECK2(x, ...) if ((x)) { printf(__VA_ARGS__); } #define CHECK3(...) { printf(__VA_ARGS__); } #define MACRO(s, ...) printf(s, ... Add solution -
Shell/Bash 2021-10-10 08:03:05
command to transform to asci code
#First way to convert to ascii code printf "\x$(printf %x 65)" #Second way to convert to ascii code set $(printf %x 65) printf "\x$1" #Third way to convert to ascii code awk 'BEGIN{printf "%c", 65}' Add solution -
Shell/Bash 2021-10-08 06:08:03
remote: Permission to asfand005/test.git denied to asfand87.
printf "protocol=https\nhost=github.com\nusername=<me>" | \ git credential-manager-core get # output: protocol=https host=github.com username=<me> password=<oldpassword> Add solution -
Shell/Bash 2021-10-02 10:14:02
command to transform to asci code bash
#First way to convert to ascii code printf "\x$(printf %x 65)" #Second way to convert to ascii code set $(printf %x 65) printf "\x$1" #Third way to convert to ascii code awk 'BEGIN{printf "%c", 65}' Add solution -
C++ 2021-10-01 17:42:06
arduino sprintf float
// On arduino, sprintf does not support formatting floats, but it can be done // with some simple integer formatting: float f = 3.14; sprintf(str, "Float value: %d.%02d", (int)f, (int)(fabsf(f)*100)%100); // str will now be: "Float value... Add solution -
C 2021-10-01 04:32:03
sigaction in c
/* Example of using sigaction() to setup a signal handler with 3 arguments * including siginfo_t. */ #include <stdio.h> #include <unistd.h> #include <signal.h> #include <string.h> static void hdl (int sig, siginfo_t *sigin... Add solution
Best helpers
SOUMEN
+5
Huggy Buggy
+5
Joyo
+5
ImMathan
+5
Anugram
+5
Vy32
+5
Daniel Cook
+5
Florian Huit
+5
Csandreas1
+5
B_archer
+5
Horse
+5
Kd88
+5
Shahruz Raad
+5
Mick Daw
+5
Czlsws
+5