Skip to content

Instantly share code, notes, and snippets.

View mobeigi's full-sized avatar
💙
Develop with heart

Mo Beigi mobeigi

💙
Develop with heart
View GitHub Profile
@mobeigi
mobeigi / tws.vmoptions
Created November 8, 2020 01:19
TWS VM Options
#
# This file contains VM parameters for Trader Workstation.
# Each parameter should be defined in a separate line and the
# last line must be followed by a line feed. No leading or
# trailing whitespaces are allowed in the same line, where a
# parameter is defined.
#
# Lines starting with a '#' character are treated as comments
# and ignored. Additionally, if a line contains a
# '### keep on update' string, all parameters defined below will
@mobeigi
mobeigi / autoexec.cfg
Last active April 24, 2025 15:06
Byte's CS2 Config
// Byte's CS2 config
// Updated 24/04/2025
echo ""
echo "##########################################"
echo " Executing Byte's autoexec.cfg"
echo "##########################################"
echo ""
// *********** Binds *****************
@mobeigi
mobeigi / autoexec.cfg
Last active April 24, 2025 12:13
Byte's CSGO Config
// Byte's CS2 config
// Updated 24/04/2025
echo ""
echo "##########################################"
echo " Executing Byte's autoexec.cfg"
echo "##########################################"
echo ""
// *********** Binds *****************
@mobeigi
mobeigi / seed_finder.js
Created August 21, 2021 03:48
Steam Market Seed Finder (CSGOFloat extension)
var seeds = document.getElementsByClassName('csgofloat-itemseed');
var patterns = [101,404,684];
for (var i = 0; i < seeds.length; ++i) {
var seed = Number(seeds[i].textContent.replace('Paint Seed: ', ''));
if (patterns.includes(seed)) {
console.log("Found seed: " + seed);
};
}
@mobeigi
mobeigi / website-url-structure-preference.md
Last active August 20, 2024 10:32
Mo Beigi's Website URL Structure Preference

Mo Beigi's Website URL Structure Preference

Websites normally employ several redirects to avoid duplicate content pages etc for SEO purposes. The following is the behaviour I found easiest to setup and most consistently used on the web. It also aligns well with the behaviour popular tools like nginx / apache / wordpress. The key is consistency.

HTTP to HTTPS (use HTTPs only)

http://(.*) -&gt; 301 https://$1
@mobeigi
mobeigi / lichess.board.css
Last active August 5, 2024 10:03
Lichess user style for custom board
cg-board::before {
background-color: #e2ae83;
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4PSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIgogICAgIHZpZXdCb3g9IjAgMCA4IDgiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyI+CjxnIGlkPSJhIj4KICA8ZyBpZD0iYiI+CiAgICA8ZyBpZD0iYyI+CiAgICAgIDxnIGlkPSJkIj4KICAgICAgICA8cmVjdCB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBpZD0iZSIgZmlsbD0iI2VkZDZiMCIvPgogICAgICAgIDx1c2UgeD0iMSIgeT0iMSIgaHJlZj0iI2UiIHg6aHJlZj0iI2UiLz4KICAgICAgICA8cmVjdCB5PSIxIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBpZD0iZiIgZmlsbD0iI2I4ODc2MiIvPgogICAgICAgIDx1c2UgeD0iMSIgeT0iLTEiIGhyZWY9IiNmIiB4OmhyZWY9IiNmIi8+CiAgICAgIDwvZz4KICAgICAgPHVzZSB4PSIyIiBocmVmPSIjZCIgeDpocmVmPSIjZCIvPgogICAgPC9nPgogICAgPHVzZSB4PSI0IiBocmVmPSIjYyIgeDpocmVmPSIjYyIvPgogIDwvZz4KICA8dXNlIHk9IjIiIGhyZWY9IiNiIiB4OmhyZWY9IiNiIi8+CjwvZz4KPHVzZSB5PSI0IiBocmVmPSIjYSIgeDpocmVmPSIjYSIvPgo8L3N2Zz4K');
filter: unset;
}
cg-wrap coords:nth-child(
@mobeigi
mobeigi / alertmanager_webhook_payload_example.json
Last active March 1, 2024 07:24
Alertmanager Webhook Payload Example
{
"receiver": "webhook",
"status": "firing",
"alerts": [
{
"status": "firing",
"labels": {
"alertname": "Test",
"dc": "eu-west-1",
"instance": "localhost:9090",
@mobeigi
mobeigi / slack_user_noti_pref_bulk_update.js
Last active October 17, 2022 19:24
Slack User Notification Preference Bulk Update
// Slack User Notification Preference Bulk Update
// By Mo Beigi
const slackTeamId = "EXAMPLE17";
const localConfigJson = JSON.parse(localStorage.localConfig_v2);
const slackUrl = localConfigJson.teams[slackTeamId].url;
let channel_ids = [];
// client.boot contains list of channel ids user is subscribed to amongst other things
await fetch(slackUrl + "api/client.boot?" +
@mobeigi
mobeigi / fastdl_virtualhost.txt
Last active June 14, 2022 21:30
FastDL Virtual Host Example
########## fastdl.example.com ##########
<VirtualHost *:443>
# SSL Config (omitted)
# Server Config (omitted)
# Allow indexing
<Directory />
Options -Indexes
AllowOverride all
Require all granted
@mobeigi
mobeigi / reddit_symbol_parser.py
Created October 3, 2021 09:07
Reddit Symbol Parser
import praw
import regex as re
reddit = praw.Reddit(
client_id="client_id",
client_secret="client_secret",
user_agent="MobeigiTest",
)
submission = reddit.submission(id="pfpyxc")