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
Created July 13, 2021 22:37
Turn off .NET SDK telemetry On Debian/Ubuntu
"The .NET SDK includes a telemetry feature that collects usage data and exception information when the .NET 
CLI crashes. The .NET CLI comes with the .NET SDK and is the set of verbs that enable you to build, test, 
and publish your .NET apps. It's important that the .NET team understands how the tools are used so they 
can be improved. Information on failures helps the team resolve problems and fix bugs."

The .NET SDK telemetry feature is enabled by default but should be prompt witch Yes/No while setting up. To turn off Telemetry open up the terminal and run

@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 / 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
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 +

@mattiasghodsian
mattiasghodsian / functions.php
Last active April 28, 2023 08:25
[Wordpress] Fix Password Protect pages with Elementor
/**
* Fix Password Protect pages with Elementor
*
* Author: Mattias Ghodsian
* Donate a cup of coffee: https://www.buymeacoffee.com/mattiasghodsian
* Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
*
* @param string $content
* @return html
*/
@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 / functions.php
Last active April 28, 2023 08:31
[Wordpress] Bootstrap 4+ Pagination
/**
* Bootstrap 4+ Pagination for Wordpress
*
* Author: Mattias Ghodsian
* Donate a cup of coffee: https://www.buymeacoffee.com/mattiasghodsian
* Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
*
* @param integer $paged
* @param integer $max_num_pages
* @param string $wrap_classe
@mattiasghodsian
mattiasghodsian / functions.php
Last active April 28, 2023 08:32
[Wordpress] Modify the page title (<title>)
/**
* Modify the page title (<title>)
* Author: Mattias Ghodsian
* Donate a cup of coffee: https://www.buymeacoffee.com/mattiasghodsian
* Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
*/
add_filter('wp_title', 'filter_page_title', 99);
add_filter( 'bloginfo', 'filter_page_title', 10, 2 );
function filter_page_title($title) {
@mattiasghodsian
mattiasghodsian / functions.php
Last active April 28, 2023 08:32
[Woocommece] Add Author to WooCommerce Products
/**
* Add Author to WooCommerce Products
* Author: Mattias Ghodsian
* Donate a cup of coffee: https://www.buymeacoffee.com/mattiasghodsian
* Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
*/
add_action('init', 'add_author_support_woocommerce', 999 );
function add_author_support_woocommerce() {
add_post_type_support( 'product', 'author' );
}
@mattiasghodsian
mattiasghodsian / functions.php
Last active April 28, 2023 08:32
[Wordpress] Add more users to Auther box
/**
* Add more users to Auther box
* Author: Mattias Ghodsian
* Donate a cup of coffee: https://www.buymeacoffee.com/mattiasghodsian
* Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
*/
add_filter('wp_dropdown_users', 'add_users_to_dropdown_users');
function add_users_to_dropdown_users()
{
global $post; // remove if not needed