Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthias Baldi matthiasbaldi

View GitHub Profile
View locked_folders
takeown /F "C:\Windows.old" /A /R /D Y
icacls "C:\Windows.old" /T /grant administrators:F
rmdir /s /q "C:\Windows.old"
@matthiasbaldi
matthiasbaldi / setup.md
Last active May 14, 2022
windows apps, winget
View setup.md

winget

winget install HandyWinget
winget install OpenJS.NodeJS.LTS
winget install Mirantis.Lens
winget install Github.cli
winget install Audacity.Audacity
winget install Microsoft.PowerShell
winget install Microsoft.PowerToys
winget install Win32diskimager.win32diskimager
@matthiasbaldi
matthiasbaldi / readme.md
Last active Aug 24, 2021
Tips & Tricks -> Just Remind it.
View readme.md

Angular

  • Wrapper for format and number pipes, for better maintainability
  • Use projections instead of working with *ngIf in template or with methods

Accessibility

  • Use a screenrreader as validation and in the development process
  • Good accessibility is also positiv for a good HTML dom and SEO
  • Respect contrast and visualize focus
@matthiasbaldi
matthiasbaldi / $PROFILE
Last active Jun 6, 2022
Powershell Setup for GitPosh with Windows Terminal
View $PROFILE
# theming configuration
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
# thanks to https://dev.to/ofhouse/add-a-bash-like-autocomplete-to-your-powershell-4257
# improved tabbing for autocompletion
# Shows navigable menu of all options when hitting Tab
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
@matthiasbaldi
matthiasbaldi / revokeTraefik2Cert.sh
Created Oct 22, 2019
Traefik 2.0 revoke Let's Encrypt cerificate
View revokeTraefik2Cert.sh
#!/usr/bin/env bash
# credits: https://github.com/containous/traefik/issues/635#issuecomment-400423859
# usage: revokeCert.sh {yourDomainToRevoke}
# the JSON path changed a bit compared with Traefik v1
set -e
ACME_FILE=/traefik/path/traefik/acme.json # change
jq -r ".default.Certificates | .[] | select(.domain.main == \"$1\").key" < $ACME_FILE | base64 --decode > /tmp/a.key
@matthiasbaldi
matthiasbaldi / app.module.ts
Created Sep 23, 2019
Deep Angular Filter-Pipe
View app.module.ts
// this file has to look something like this...
import {NgModule,} from '@angular/core';
import { MyComponent } from './my.component';
import { FilterPipe } from './filter.pipe';
@NgModule({
declarations: [
MyComponent
@matthiasbaldi
matthiasbaldi / squash-commits.sh
Created Apr 3, 2019
GIT squash a PR to one commit
View squash-commits.sh
# the hash describes the commit you want to go back
git reset --soft <hash>
git commit -m "<message>"
git push
@matthiasbaldi
matthiasbaldi / enableAdminGenerateTokens.groovy
Created Feb 19, 2019
Jenkins Allow Administrator to generate API Tokens
View enableAdminGenerateTokens.groovy
// execute the following line in <yourjenkins>/script script console
// and then you can generate for every user tokens <yourjenkins>/user/<username>/configure
jenkins.security.ApiTokenProperty.ADMIN_CAN_GENERATE_NEW_TOKENS = true
View InstallFluentTerminal.md
@matthiasbaldi
matthiasbaldi / git-commit-prefixes
Last active Oct 23, 2018 — forked from Marak/git-commit-prefixes
Short list of Git commit prefixes used at Nodejitsu
View git-commit-prefixes
[api]: New apis / changes to apis
[test]: Update test/* files
[dist]: Changes to submodules, version bumps, updates to package.json
[minor]: Small changes
[doc]: Updates to documentation
[ux]: Updates to UX
[fix]: Bug fixes
[feat]: new Feature
[bin]: Update binary scripts associated with the project
[merge]: Resolved git merge from upstream or otherwise