Skip to content

Instantly share code, notes, and snippets.

View arisnacg's full-sized avatar

Gus Arisna arisnacg

View GitHub Profile
@arisnacg
arisnacg / onedark-deep.yml
Created March 6, 2024 14:42
One Dark Deep Theme for Alacritty. The colors based on https://github.com/navarasu/onedark.nvim
# Colors (One Dark)
colors:
# Default colors
primary:
background: '0x1a212e'
foreground: '0x93a4c3'
# Normal colors
normal:
black: '0x0c0e15'
@arisnacg
arisnacg / main.rs
Created August 4, 2023 17:47
Rust TicTacToe main function
fn main() {
const TOTAL_ROWS: usize = 3;
const TOTAL_COLUMNS: usize = 3;
const MAX_FILL: usize = TOTAL_ROWS * TOTAL_COLUMNS;
let mut board = create_board(TOTAL_ROWS, TOTAL_COLUMNS);
let mut game_end = false;
clearscreen();
println!("[*] WELCOME TO TICTACTOE GAME [*]");
let human_char = ask_player_char();
@arisnacg
arisnacg / main.rs
Created August 4, 2023 17:32
Rust TicTacToe AI Minimax functions
use tabled::builder::Builder;
use tabled::settings::Style;
use std::io;
fn main() {
const TOTAL_ROWS: usize = 3;
const TOTAL_COLUMNS: usize = 3;
clearscreen();
let mut board = create_board(TOTAL_ROWS, TOTAL_COLUMNS);
let human_char = 'X';
@arisnacg
arisnacg / main.rs
Last active August 4, 2023 17:04
Rust TicTacToe user input functions
use tabled::builder::Builder;
use tabled::settings::Style;
use std::io;
fn main() {
const TOTAL_ROWS: usize = 3;
const TOTAL_COLUMNS: usize = 3;
clearscreen();
let mut board = create_board(TOTAL_ROWS, TOTAL_COLUMNS);
let human_char = ask_player_char();
@arisnacg
arisnacg / main.rs
Created August 4, 2023 16:40
Rust TicTacToe game state functions
use tabled::builder::Builder;
use tabled::settings::Style;
fn main() {
const TOTAL_ROWS: usize = 3;
const TOTAL_COLUMNS: usize = 3;
clearscreen();
let mut board = create_board(TOTAL_ROWS, TOTAL_COLUMNS);
fill_box(&mut board, 0, 0, 'X');
fill_box(&mut board, 1, 1, 'X');
@arisnacg
arisnacg / main.rs
Last active August 4, 2023 16:38
Rust Tictactoe board functions
use tabled::builder::Builder;
use tabled::settings::Style;
fn main() {
const TOTAL_ROWS: usize = 3;
const TOTAL_COLUMNS: usize = 3;
clearscreen();
let mut board = create_board(TOTAL_ROWS, TOTAL_COLUMNS);
print_board(board.clone());
fill_box(&mut board, 1, 1, 'X');
@arisnacg
arisnacg / Cargo.toml
Created August 4, 2023 16:10
Rust Tictactoe Dependencies
[package]
name = "rust-tictactoe"
version = "0.1.0"
edition = "2021"
[dependencies]
tabled="0.13.0"
@arisnacg
arisnacg / portainer-agent-td.json
Last active May 26, 2023 07:04
ECS task-defintion for portainer agent
{
"family": "portainer-agent",
"containerDefinitions": [
{
"name": "portainer-agent",
"image": "portainer/agent:2.16.2",
"memoryReservation": 128,
"portMappings": [
{
"hostPort": 9001,