Skip to content

Instantly share code, notes, and snippets.

View alirezaarzehgar's full-sized avatar
😃
Focusing

Ali alirezaarzehgar

😃
Focusing
View GitHub Profile
@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
@alirezaarzehgar
alirezaarzehgar / bomber.go
Created November 14, 2023 06:39
SMS bomber with go
package main
import (
"bufio"
"bytes"
"encoding/json"
"flag"
"fmt"
"log"
"net/http"
@alirezaarzehgar
alirezaarzehgar / test-payment.go
Created September 23, 2023 14:59
Connect golang application to payment gateway
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
// https://aqayepardakht.ir/api/
@alirezaarzehgar
alirezaarzehgar / server.go
Created August 17, 2023 05:09
Simplest golang websocket chat server
package main
import (
"log"
"net/http"
"github.com/gorilla/websocket"
)
func main() {