Skip to content

Instantly share code, notes, and snippets.

View mattiasghodsian's full-sized avatar
๐Ÿ 
Working from home

mattiasghodsian

๐Ÿ 
Working from home
View GitHub Profile
@mattiasghodsian
mattiasghodsian / README.md
Last active April 21, 2025 18:59
Inertia.js Form Helper for Axios/API calls

Inertia.js currently lacks a built-in method for making endpoint requests to retrieve data without triggering a page reload. The following solution is adapted from mohitmamoria solution implementation.

Example

const title = "";
const form = useAPIForm({
    title: '',
});
@mattiasghodsian
mattiasghodsian / ngrok-ssh-tunnel.md
Created December 11, 2024 13:51
[SSH/NGROK] Using Ngrok to SSH into Your Home Network

Using Ngrok to SSH into Your Home Network

Setting up Ngrok to SSH into your home network remotely. This guide will walk you through the configuration and setup of Ngrok, including running it as a system service.

Prerequisites

  • A linux host machine on your home network.
  • Ngrok account and ngrok installed on your machine.

How to

Let's start with verify the path where Ngrok is installed, use the following command

@mattiasghodsian
mattiasghodsian / BulkDownloader.ps1
Created June 25, 2024 21:34
[PowerShell] Bulk File Downloader
# Author: Mattias Ghodsian
# Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
# Donate coffee: https://www.buymeacoffee.com/mattiasghodsian
# Example: .\BulkDownloader.ps1 -urlTemplate "https://example/uploads/AUDIO/book/**.mp3" -maxInterval 54
param (
[string]$urlTemplate, # URL template with **
[int]$maxInterval # Maximum interval number
)
@mattiasghodsian
mattiasghodsian / gist:b45515cd77dc6e1dcbadfc6563764b4a
Created May 3, 2024 20:38 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@mattiasghodsian
mattiasghodsian / thumbnail-grid-generator.ps1
Created April 15, 2024 22:15
[PowerShell] Thumbnail Grid Generator with ffmpeg
# Author: Mattias Ghodsian
# Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
# Donate coffee: https://www.buymeacoffee.com/mattiasghodsian
$ffmpeg = ".\ffmpeg.exe"
$directory = $PWD.Path
$video = ".\video.mkv"
$filenameWithExtension = Split-Path -Leaf $video
# Specify the starting time offset
@mattiasghodsian
mattiasghodsian / readme.md
Created August 31, 2023 12:02
[Laravel] Removing API Prefix for API Subdomains

If you are utilizing Laravel as a backend platform serving API routes via a subdomain https://api.example.com/, you may find that the default routing configuration for the api route is not needed.

Edit /app/Providers/RouteServiceProvider.php and locate the prefix('api') line and comment it out or remove it altogether, in my case i don't need the web route group so i commented that part out.

<?php

namespace App\Providers;

use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
@mattiasghodsian
mattiasghodsian / readme.md
Created December 29, 2022 15:29
Play Commander Keen 1 on Debian distros

Play Commander Keen 1 on Debian distros

Easy guide to install and play Commander Keen 1.

1. Install DOSBOX

sudo apt-get install dosbox

2. Commander Keen 1

I do not endorse piracy and do NOT take any responsibility.

@mattiasghodsian
mattiasghodsian / readme.md
Created November 22, 2022 09:41
DBeaver - OutOfMemoryError occurred while reading file

How to fix DBeaver - OutOfMemoryError occurred while reading file

When u encounter OutOfMemoryError occurred while reading file DBeaver needs more memory to read big SQL files

Edit dbeaver.ini

nano /usr/share/dbeaver-ce/dbeaver.ini 
-vmargs
@mattiasghodsian
mattiasghodsian / core-keeper-watcher.sh
Last active April 28, 2023 08:30
Send GameID to Discord Channel for Core Keeper Dedicated Server
#!/bin/bash
# Author: Mattias Ghodsian
# Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
# Donate coffee: https://www.buymeacoffee.com/mattiasghodsian
filename="path-to-game-file-directory/GameID.txt"
m1=$(md5sum "$filename")
while true; do
@mattiasghodsian
mattiasghodsian / readme.md
Last active January 5, 2023 09:37
Install flameshot and bind to Prt Sc key on Ubuntu 20.04

Install flameshot

Remove current bind on Prt Sc key

gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot '[]'

Bind flameshot by going to Setttings > Keyboard Shortcuts and then scroll all the way down and press the +