This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Generate a self-signed certificate for specified hosts | |
# and add it to the system keychain. | |
# Requires: openssl, sudo | |
set -euo pipefail | |
# Configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InlayHints: | |
ParameterNames: No | |
DeducedTypes: No | |
Diagnostics: | |
UnusedIncludes: Strict | |
ClangTidy: | |
Add: [bugprone-*, cert-*, modernize-*, performance-*] | |
Remove: [bugprone-easily-swappable-parameters, modernize-use-trailing-return-type, cert-err33-c, cert-err34-c] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"main": { | |
"scope": "c,c++", | |
"prefix": "main", | |
"body": [ | |
"#include <stdio.h>", | |
"", | |
"int main(int argc, char*argv[]) {", | |
"\t$0", | |
"\treturn 0;", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#include "stdafx.h" | |
#include <sodium.h> | |
#include <iostream> | |
using namespace std; | |
#define MESSAGE (const unsigned char *) "test" | |
#define MESSAGE_LEN 4 | |
#define CIPHERTEXT_LEN (crypto_box_SEALBYTES + MESSAGE_LEN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Define the backup directory | |
BACKUP_DIR="$HOME/dotfile-backup" | |
get_vscode_settings_path() { | |
case "$OSTYPE" in | |
linux-gnu*) | |
# Linux | |
if [ -n "$WSL_DISTRO_NAME" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script installs the latest version of Go on your system. | |
# _________ _ _______ _________ _______ _ _ _______ _______ | |
# \__ __/( ( /|( ____ \\__ __/( ___ )( \ ( \ ( ____ \( ___ ) | |
# ) ( | \ ( || ( \/ ) ( | ( ) || ( | ( | ( \/| ( ) | | |
# | | | \ | || (_____ | | | (___) || | | | | | | | | | | |
# | | | (\ \) |(_____ ) | | | ___ || | | | | | ____ | | | | | |
# | | | | \ | ) | | | | ( ) || | | | | | \_ )| | | | | |
# ___) (___| ) \ |/\____) | | | | ) ( || (____/\| (____/\ | (___) || (___) | | |
# \_______/|/ )_)\_______) )_( |/ \|(_______/(_______/ (_______)(_______) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC = gcc | |
CFLAGS = -Wall -Wextra -std=c11 -O2 | |
LDFLAGS = -lcurl -ljansson -ldotenv | |
SRCDIR = src | |
OBJDIR = obj | |
BINDIR = bin | |
DATADIR = data | |
SRC = $(wildcard $(SRCDIR)/*.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update -y | |
sudo apt-get install ca-certificates curl gnupg lsb-release | |
# Add Docker’s official GPG key | |
sudo mkdir -m 0755 -p /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package schemagen | |
import ( | |
"fmt" | |
"go/ast" | |
"go/parser" | |
"go/token" | |
"strings" | |
) |
NewerOlder