Skip to content

Instantly share code, notes, and snippets.

View alirezaarzehgar's full-sized avatar
😃
Focusing

Ali alirezaarzehgar

😃
Focusing
View GitHub Profile
@alirezaarzehgar
alirezaarzehgar / docker-compose.yaml
Created July 21, 2025 09:35
ScyllaDB Golang Example
version: "3.3"
services:
scylla1:
container_name: scylla1
image: docker.arvancloud.ir/scylladb/scylla:latest
ports:
- 9001:9042
scylla2:
container_name: scylla2
image: docker.arvancloud.ir/scylladb/scylla:latest
@alirezaarzehgar
alirezaarzehgar / leveldb.go
Created June 24, 2025 12:12
LevelDB+Golang Hello World
package main
import (
"bufio"
"fmt"
"log"
"os"
"strings"
"github.com/syndtr/goleveldb/leveldb"
#!/usr/bin/env bash
STARTUP_SH=~/.config/i3/startup.sh
I3_CONF=~/.config/i3/config
if [ -f ${STARTUP_SH} ]; then
echo You have already startup.sh installed.
echo No need to config more.
exit
fi
@alirezaarzehgar
alirezaarzehgar / dooz.c
Created January 9, 2025 11:24
dooz game
#include <asm-generic/errno.h>
#include <stdio.h>
#include <stdbool.h>
enum {
E = 0,
P1 = 'X',
P2 = 'O'
};
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
class Database {
fstream table;
public:
@alirezaarzehgar
alirezaarzehgar / linkedlist-insert.cpp
Last active June 22, 2024 22:45
cpp Linked Lists
#include <iostream>
using namespace std;
struct Node {
int date;
Node *link;
};
int main()
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
class Database {
fstream table;
public:
@alirezaarzehgar
alirezaarzehgar / remove-all-origins.sh
Created December 8, 2023 11:28
Remove every repository on github and push FU!
#!/usr/bin/bash
shopt -s extglob
git config --global user.name "Fucker"
git config --global user.email "[email protected]"
for dir in $(ls -d */); do
cd $dir
git fetch --prune
git checkout --orphan delete
@alirezaarzehgar
alirezaarzehgar / swagger-static.sh
Created November 30, 2023 20:35
Use swagger static
#!/usr/bin/env bash
SWAGGER_JSON_PATH=/tmp/docs/swagger.json
SWAGGER_VERSION=5.10.3
SWAGGER_RELEASE=https://github.com/swagger-api/swagger-ui/archive/refs/tags/v${SWAGGER_VERSION}.zip
DIRNAME=swagger-ui-${SWAGGER_VERSION}
wget --no-clobber ${SWAGGER_RELEASE} -O swag.zip
unzip swag.zip