Skip to content

Instantly share code, notes, and snippets.

View ksindi's full-sized avatar
🚀
Shipping

Kamil Sindi ksindi

🚀
Shipping
View GitHub Profile

Guidelines for API Design and Performance

Design Principles

Understanding HTTP Methods

  1. Clearly distinguish between POST, PATCH, and PUT to ensure proper usage and behavior in API interactions.

Endpoint Naming Conventions

@denguir
denguir / cuda_install.md
Last active August 14, 2025 11:10
Installation procedure for CUDA / cuDNN / TensorRT

How to install CUDA / cuDNN / TensorRT on Ubuntu

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

const awsTool = new DynamicTool({
name: "aws-cli",
description:
"This is AWS CLI. You can call this to send commands to the AWS Cloud. Use AWS CLI format like `aws s3api list-buckets`",
async func(command) {
const args = command.split(" ").filter((x) => x !== "aws");
const result = spawnSync("aws", args, {
env: {
...process.env,
AWS_REGION: "eu-central-1",
@domnikl
domnikl / build.yml
Last active December 21, 2024 12:01
GitHub Action Workflow to build a Rust project with tests and clippy
name: main
on:
push:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
@MRGRAVITY817
MRGRAVITY817 / main.rs
Last active October 9, 2024 12:45
State machine template built with Rust
use std::marker::PhantomData;
struct Reserved;
struct Cooking;
struct Delivering;
struct Arrived;
struct FoodDelivery<State = Reserved> {
state: PhantomData<State>,
}
@daniel-cortez-stevenson
daniel-cortez-stevenson / elasticsearch-service-template.yaml
Last active December 15, 2023 09:50
AWS ElasticSearch Domain with VPC and Bastion Cloudformation Template
# Copyright 2020 Daniel Cortez Stevenson
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@borischerkasky
borischerkasky / docker-compose.yml
Last active September 23, 2024 22:37
localstack docker compose
version: "3"
services:
localstack:
image: localstack/localstack
ports:
- "4568-4576:4568-4576"
- "${PORT_WEB_UI-8080}:${PORT_WEB_UI-8080}"
environment:
- DOCKER_HOST=unix:///var/run/docker.sock
@miguelmota
miguelmota / csv_write.go
Last active November 28, 2024 00:10
Golang CSV write example
package main
import (
"encoding/csv"
"log"
"os"
)
func main() {
records := [][]string{

tldr: go build only produces an executable for main packages. Check the package name of your main file is main.

I am an idiot. Its only through mistakes that you learn tho. I have recently been running into issues with my new golang projects. ONLY the new ones. Whenever I try to make a new project, it would always have issues. The biggest issue is the fact that "go build" would not produce an executable without "-o main.exe" as arguments. When an executable was produced, if I ran it I got

$ ./main.exe
./main.exe: line 1: syntax error near unexpected token \`newline\'
./main.exe: line 1: \`!<arch>\'
package main
import (
"encoding/json"
"fmt"
)
func main() {
b := []byte(`{"key":"value"}`)