Skip to content

Instantly share code, notes, and snippets.

View simonholm's full-sized avatar
:octocat:

Simon Holm simonholm

:octocat:
View GitHub Profile
@simonholm
simonholm / vscode_ext_pwsh.ps1
Last active June 23, 2021 07:00
get all your installed vscode ext with powershell
# source https://twitter.com/mbcrump/status/1275106945968386050?s=20
code --list-extensions | % {"code --install-extension $_"}
# my mod, if using vscode insiders
code-insiders --list-extensions | % {"code-insiders --install-extension $_"}
# other e.g. sorce https://twitter.com/rauschma/status/1240791939114467328?s=20
@simonholm
simonholm / install_libgtk.sh
Last active June 12, 2021 20:59
compiler error glib-2.0 was not found in the pkg-config search path
# compiler error glib-2.0 was not found in the pkg-config search path
sudo apt-get install libgtk-3-dev
# source https://github.com/gi-rust/glib-sys/issues/5#issuecomment-320515059
@simonholm
simonholm / vim_uncomment.md
Last active June 16, 2021 21:13
vim howto uncomment/comment
@simonholm
simonholm / stuck_in_execute_prompt.md
Last active May 30, 2021 19:37
note to self, stuck in execute: _ prompt
@simonholm
simonholm / import_module_appx_powershell7.ps1
Last active December 17, 2022 07:47
powershell 7 import-module appx issue (0x80131539), interim solution
# remove build in apps, source https://www.askvg.com/guide-how-to-remove-all-built-in-apps-in-windows-10/
# don't work with powershell 7 though
# source https://github.com/PowerShell/PowerShell/issues/13138#issuecomment-849965912
import-module appx -usewindowspowershell
# other examples
# source https://github.com/PowerShell/PowerShell/issues/13138#issuecomment-851366340
Import-Module -Name Appx -UseWindowsPowerShell -WarningAction SilentlyContinue
@simonholm
simonholm / detect_os.sh
Last active May 29, 2021 20:46
not to self, command detect os version
cat /etc/os-release
lsb_release -a
hostnamectl
# kernal
uname -r
# source https://www.cyberciti.biz/faq/how-to-check-os-version-in-linux-command-line/
@simonholm
simonholm / md_the_escape_artist.md
Last active May 8, 2021 05:07
note to self, escape pound sign in markdown, and line brake, you supposed to use html brake instead of backslash
@simonholm
simonholm / test.md
Last active May 23, 2021 06:36
testing comments, fail

# solution fails
[//]: # (This syntax works like a comment, and won't appear in any output.)

@simonholm
simonholm / pretty_path_output.sh
Last active November 10, 2021 00:15
note to self, formatting $PATH output nicely by row
echo "${PATH//:/$'\n'}"
# HT 2 https://askubuntu.com/a/600028/610990
# other way to display PATH sed, tr etc https://askubuntu.com/a/600019/610990
@simonholm
simonholm / gpufetch.sh
Created April 14, 2021 05:47
note to self, gpufetch, ht itsfoss.com
git clone https://github.com/Dr-Noob/cpufetch
cd gpufetch
make
#HT https://itsfoss.com/cpufetch/