Skip to content

Instantly share code, notes, and snippets.

View Molter's full-sized avatar

Gabriel Molter Molter

View GitHub Profile
@Molter
Molter / molter.omp.json
Last active April 29, 2022 02:41
Oh-My-Posh theme - forked from unicorn.omp.json
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#003543",
"foreground": "#fff",
"powerline_symbol": "\ue0b0",
@alyleite
alyleite / wsl.md
Last active May 5, 2024 01:30
Failed to connect to bus: Host is down - WSL 2

» sudo systemctl daemon-reload

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

==============================================

Edit*

  1. Open /etc/wsl.conf with any editor:
@Molter
Molter / material.module.ts
Created March 8, 2020 16:20
Angular Material Imports in a specific module
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatInputModule } from '@angular/material/input';
import { MatButtonModule } from '@angular/material/button';
import { MatSelectModule } from '@angular/material/select';
import { MatRadioModule } from '@angular/material/radio';
import { MatCardModule } from '@angular/material/card';
import { LayoutModule } from '@angular/cdk/layout';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatSidenavModule } from '@angular/material/sidenav';
@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active April 23, 2024 12:18
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@brianoflan
brianoflan / iterateOverCFOrgsSpaces.sh
Last active June 19, 2023 18:14
How to iterate over all orgs and spaces on a Cloud Foundry endpoint (cf, cf routes, cf orgs, cf spaces, CloudFoundry)
#!/bin/bash
timeout=gtimeout
action() {
echo "cf_routes $1 $2" 1>&2 ;
local x=`cf_routes $1 $2 | egrep -v '^( *$|space *|name *|Getting routes|FAILED|No space targeted|No routes found)' | egrep '.' | perl -ne 'print " $_"'` ;
[[ -z $x ]] || echo -e " Found it:\n$x." ;
echo "" 1>&2 ;
}
main() {