Skip to content

Instantly share code, notes, and snippets.

View pedrohba1's full-sized avatar
👍
Studying to make beautiful things

Pedro Bufulin pedrohba1

👍
Studying to make beautiful things
  • Uberlândia.
View GitHub Profile
@tonious
tonious / hash.c
Last active June 21, 2024 00:57
A quick hashtable implementation in c.
/* Read this comment first: https://gist.github.com/tonious/1377667#gistcomment-2277101
* 2017-12-05
*
* -- T.
*/
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */
#include <stdlib.h>
#include <stdio.h>
@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@niklaskeerl
niklaskeerl / backup.md
Last active May 24, 2024 10:00
Encrypted backup using an external hard drive with luks and timeshift