Skip to content

Instantly share code, notes, and snippets.

@zachrank
zachrank / wsl2-zsh-powerlevel10k.md
Created August 8, 2022 01:43
WSL 2 + Windows Terminal + Oh My Zsh + Powerlevel10k

WSL 2 + Windows Terminal + Oh My Zsh + Powerlevel10k

wsl2-zsh-powerlevel10k

This gist takes heavy inspiration from kevin-smets / iterm2-solarized.md gist for iTerm2.

Windows Subsystem for Linux 2 (WSL 2)

The first thing that you will want to do is install WSL 2 and a Linux distro.

#!/usr/bin/env bash
# --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\
function register_clang_version {
local version=$1
local priority=$2
update-alternatives \
--install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \
@jornane
jornane / GROW.md
Created October 23, 2017 12:12
How to grow a partition in Linux

How to grow a partition in Linux

This guide will walk you through the steps required to grow a partition in Linux. You will have to reboot through this guide.

  1. If possible, make a snapshot.

Often, you will want to grow the partition table because you made your virtual hard disk too small, and you tried to extend it in your hypervisor, only to find out that your partition is still the same size as it was before.

@kematzy
kematzy / vscode-snippets-placeholder-transformation-tutorial.md
Last active May 8, 2024 08:36
VS Code Snippets Placeholder Transformations Tutorial

VS Code Snippets Placeholder Transformations

This is a quick tutorial on how to create VS Code snippets that formats your snippet placeholder variables correctly.

Hopefully Google will show this in the search results so that others that are struggling in this area can be helped.


@azharism
azharism / k8s-install.md
Created May 8, 2024 08:34 — forked from NotHarshhaa/k8s-install.md
k8s step-by-step installation guide on Ubuntu 20.04 from scratch

Certainly! Here's a step-by-step guide to installing Kubernetes (K8s) on Ubuntu 20.04 from scratch. This guide will walk you through the process of setting up a basic Kubernetes cluster using kubeadm, kubelet, and kubectl.

Prerequisites:

  1. Ubuntu 20.04: You should have a clean installation of Ubuntu 20.04 on the machines where you plan to set up your Kubernetes cluster.

  2. Minimum 2 Nodes: For a basic Kubernetes cluster, you need at least two nodes - one for the master and one or more for worker nodes.

  3. Network Configuration: Ensure that your nodes can communicate with each other over the network. You should have a static IP address for each node.

@JolandaVerhoef
JolandaVerhoef / Compose-PhotoGrid.kt
Created June 30, 2023 12:14
Photogrid with multi-select and zoomable images
/*
* Copyright 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@irazasyed
irazasyed / outbound-email-with-cloudflare.md
Last active May 8, 2024 08:34
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

@xirkus
xirkus / yubikey+gpupgp+ssh_howto.md
Last active May 8, 2024 08:34
Security Adventures 1. How to get yubikey+gpg+ssh+gitbhub working on MacOS

I've spent the day trying to get this setup working with GitHub and given the number of gotcha's I encountered, it seemed like a good idea to document how I finally got this working with as few hacks as possible. There's a lot of documentation out there (some of it old and misleading) and committing here for posterity will help me remember this when I inevitably need to do this again.

Rationale

Passwords are simply not enough these days. Regardless of the company, breaches (and the associated Personally Identifiable Information harvested) are a matter of not if, but when. There are a number of things you can do to protect yourself, but being on the tin-foil-hat side of paranoia, means there are a few Commandents that I adhere to (and recommend for other folks)[Insert link to Fight Club Rules for the Secure Internet].

That being said, if you use 2-factor authentication and have committed to using a hardware token such as the Yubikey, then you're already ahead of the curve. The problem is that wh

@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"