Skip to content

Instantly share code, notes, and snippets.

View UnnatShaneshwar's full-sized avatar
🎯
Focusing

Unnat UnnatShaneshwar

🎯
Focusing
View GitHub Profile
@william8th
william8th / arch-linux-installation
Created August 6, 2018 03:27
ArchLinux installation guide
# Boot into Live CD/USB
# Use UK keyboard
loadkeys uk
# Check partitions available
fdisk -l
# Use fdisk to format partitions
# o to overwrite the disk
# n to create new partition
@marianocordoba
marianocordoba / .bashrc
Last active May 13, 2021 15:58
Cool bash prompt
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
show_git_branch() {
if [ ! -z "$(parse_git_branch)" ]; then
echo -e "\001\033[48;5;8;38;5;4m\002\ue0b0\001\033[0m\002\001\033[0;48;5;8m\002 \uf418 $(parse_git_branch) \001\033[0m\002\001\033[0;38;5;8m\002\ue0b0\001\033[0m\002 "
else
echo -e "\001\033[38;5;4m\002\ue0b0\001\033[0m\002 "
fi
@pimatco
pimatco / all-angular-material-components-imports.txt
Last active December 6, 2023 15:24
All Angular Material Components Imports from app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
//Angular Material Components
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MatCheckboxModule} from '@angular/material';
import {MatButtonModule} from '@angular/material';
@lenary
lenary / exit-status.plugin.zsh
Last active October 31, 2023 03:19
Last command's exit status, for your prompt. Put ${last_exit} into your prompt somewhere. It uses zsh's prompt escapes.
precmd_functions=("_exit_status" ${precmd_functions[@]})
function _exit_status() {
local last_exit_status=$?
export last_exit=""
if [ -z "${last_exit_status}" ]; then
last_exit=""
elif (( last_exit_status != 0 )); then
local description