Skip to content

Instantly share code, notes, and snippets.

return {
-- Add `pyright` to mason
-- TODO: check following tools -> mypy types-requests types-docutils
{
"williamboman/mason.nvim",
opts = function(_, opts)
-- vim.list_extend(opts.ensure_installed, { "pyright", "black", "ruff-lsp", "ruff" })
vim.list_extend(opts.ensure_installed, {
"pyright",
"black",
@githubmo
githubmo / tips.md
Last active December 9, 2023 13:52
Tips for Tim - cool stuff for mac
@githubmo
githubmo / aspnet_best_practices.md
Last active July 24, 2023 12:15
Best practices for ASP.Net

Here are a list of best practices for C#, .Net and ASP.net

How to go about creating a solution, library and project from scratch: https://www.youtube.com/watch?v=PmDJIooZjBE, this is mentioned again below

C#:

.NET:

Creating new projects:

@githubmo
githubmo / .editorconfig
Last active July 15, 2023 11:47
Personal C# .editorconfig inspired by Resharper and Jetbrains Rider defaults
root = true # indicates it's the top-most EditorConfig file
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = false
insert_final_newline = false
# Microsoft .NET properties
csharp_new_line_before_members_in_object_initializers = false
@githubmo
githubmo / stream-audio.md
Created February 24, 2021 16:51 — forked from jbs1/stream-audio.md
How to filter the sound of any application from OBS or other Streaming software. (Windows)

How to filter the sound of any application from OBS or other Streaming software. (Windows)

First you need to install VB-Cable and download the audiorouter.
Virtual Audio Cable
Audio Router

Then make sure that for all recoding/playback audio deviced in the soundsettings the exlusive mode is disabled.

Next configure your "Default Playback device" in Windows Sound options to be the device you want to here on, eg. your headphones or speakers.
And configure the "Default Recording device" in Windows Sound options to be the device you want to recode on. Usually your Microphone.

Keybase proof

I hereby claim:

  • I am githubmo on github.
  • I am mzawi (https://keybase.io/mzawi) on keybase.
  • I have a public key ASDmq2F7Ge1gTJ8Yo6B6L0O3aHIvW8C0pK0SpqP69qIhzgo

To claim this, I am signing this object:

@githubmo
githubmo / p4merge-git-tool.md
Last active June 13, 2019 13:06 — forked from dgoguerra/p4merge-git-tool.md
Setup p4merge as difftool and mergetool on Windows

For the final day of the course, we will be looking at how to resolve merge conflicts. One way to do it is via the command line. Another is to use a visuallising diff tool. We will be using P4Merge as our tool and this should be set up for the final day of the course.

There are two ways to set it up: using the command line, and directly editing the config file. Choose the method that you are more comfortable with. I usally tend to use the former.

Setting up from the command line

Being the installation path "C:Program Files\Perforce\p4merge.exe", just run:

$ git config --global diff.tool p4merge
$ git config --global difftool.p4merge.path 'C:\Program Files\Perforce\p4merge.exe'
@githubmo
githubmo / README.md
Created September 6, 2017 09:55 — forked from rantav/README.md
Find slow queries in mongo DB

A few show tricks to find slow queries in mongodb

Enable profiling

First, you have to enable profiling

> db.setProfilingLevel(1)

Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...

Keybase proof

I hereby claim:

  • I am githubmo on github.
  • I am githubmo (https://keybase.io/githubmo) on keybase.
  • I have a public key whose fingerprint is 1132 6644 E153 8439 6D6B D019 F210 6591 A590 EF00

To claim this, I am signing this object:

{
"version": 1,
"variables": [{
"names": ["email", "phone"],
"values": [
["a@sink.sendgrid.net", "07911111189"],
["b@sink.sendgrid.net", "07911111166"],
["c@sink.sendgrid.net", "07922222222"],
["d@sink.sendgrid.net", "07933333333"]
]}