Skip to content

Instantly share code, notes, and snippets.

@fardjad
fardjad / how-to-install-homebrew-on-manjaro.md
Last active Jul 8, 2021
[How to Install homebrew on Manjaro] Steps required to install homebrew on Manjaro Linux #linux #manjaro #homebrew
View how-to-install-homebrew-on-manjaro.md

How to Install homebrew on Manjaro

Steps required to install homebrew on Manjaro Linux

Steps

  1. Install base-devel

     pacman -Syu # CAUTION: this updates the whole system
     pacman -S base-devel
    
@fardjad
fardjad / center-active-window.ahk
Last active Jun 29, 2021
[center-active-window.ahk] An AutoHotkey script to make WinKey+C center active window #autohotkey #windows
View center-active-window.ahk
; Courtesy of http://superuser.com/a/403191
^#c::
WinGetTitle, windowName, A
CenterWindow(windowTitleVariable) {
WinGetPos,,, Width, Height, %windowTitleVariable%
WinMove, %windowTitleVariable%,, (A_ScreenWidth - Width) / 2, (A_ScreenHeight - Height) / 2
}
@fardjad
fardjad / how-to-install-parallels-tools-on-manjaro.md
Last active Jun 14, 2021
[How to Install Parallels Tools on Manjaro] Steps required to install Paralells Tools on Manjaro Linux #linux #manjaro #parallelsdesktop #macos
View how-to-install-parallels-tools-on-manjaro.md

How to Install Parallels Tools on Manjaro

Steps required to install Paralells Tools on Manjaro Linux

Steps

  1. Install Manjaro Linux on a VM (it's recommended to take a snapshot before installing Parallels Tools)

  2. Update the OS

     pacman -Syu
    
@fardjad
fardjad / debian-sid-with-systemd-on-wsl2.md
Last active Jun 1, 2021
[Debian sid with systemd on WSL2] Instructions for running Debian sid with systemd on WSL2 #windows #wsl2 #debian #sid #linux
View debian-sid-with-systemd-on-wsl2.md

Debian sid with systemd on WSL2

Instructions for running Debian sid with systemd on WSL2

Instructions

  1. Make sure you're running Windows 10 Build 19041+ (run ver)

  2. Enable the Windows Subsystem for Linux (reboot if needed):

     # In an elevated PowerShell session
     Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    
@fardjad
fardjad / batch-m4a-to-mp3.md
Last active Apr 9, 2021
[How to Convert m4a Files to mp3, Preserving Bitrate and ID3 Tags Using ffmpeg] #ffmpeg #bash
View batch-m4a-to-mp3.md

How to convert m4a files to mp3, preserving bitrate and id3 tags using ffmpeg

Prerequisites

  1. ffmpeg
  2. cygwin (on windows)

Commands

cd /path/to/m4a/files
mkdir out
for f in *.m4a; do 
@fardjad
fardjad / minikube-on-wsl2-with-podman.md
Last active Mar 14, 2021
[Minikube on WSL2 with Podman] Tips for running a local development Kubernetes cluster on WSL2 with Podman #wsl2 #minikube #podman #kubernetes #docker
View minikube-on-wsl2-with-podman.md
@fardjad
fardjad / dsl-lte-auto-switch-setup.md
Last active Aug 30, 2020
[DSL/LTE Auto-switch Setup] #openwrt #dsl #lte #multiwan
View dsl-lte-auto-switch-setup.md

DSL/LTE Auto-switch Setup

Synopsis

This is how I setup my home router to share a 4G/LTE connection at day and switch to a DSL connection overnight.

It also falls back to DSL connection whenever the 4G/LTE connection dies.

Why?

@fardjad
fardjad / how-to-enable-dark-theme-on-elementaryos.md
Last active Aug 22, 2020
[How to Enable Dark Theme on ElementaryOS] Instructions for enabling dark theme (almost) everywhere on ElementaryOS #elementary #linux #dark
View how-to-enable-dark-theme-on-elementaryos.md

How to Enable Dark Theme on ElementaryOS

Instructions for enabling dark theme (almost) everywhere on ElementaryOS

Pantheon Apps

  1. Replace the contents of /usr/share/dbus-1/interfaces/io.elementary.pantheon.AccountsService.xml with this file.
  2. Replace the line <annotation name="org.freedesktop.Accounts.DefaultValue" value="0"/> with <annotation name="org.freedesktop.Accounts.DefaultValue" value="1"/> under PreferColorScheme section.

Source

@fardjad
fardjad / how-to-install-ice-ssb-manager-on-debian.md
Last active Aug 7, 2020
[How to install ICE - SSB Manager on Debian] Steps required to build and install ICE SSB on Debian Linux and its derivatives #ice #ssb #debian
View how-to-install-ice-ssb-manager-on-debian.md

How to install ICE - SSB Manager on Debian

Steps required to build and install ICE SSB on Debian Linux and its derivatives

Steps

  1. Install the dependencies

     apt install build-essential devscripts
     apt install python3 python3-gi python3-requests python3-bs4 python3-lxml
     apt install chromium-browser
    
@fardjad
fardjad / kubernetes-resources-cheatsheet.md
Last active Jul 1, 2020
[Kubernetes resources cheatsheet] A cheatsheet for Kubernetes resource types and their hierarchy #kubernetes #cheatsheet
View kubernetes-resources-cheatsheet.md

Resources

Controllers

In Kubernetes, controllers are control loops that watch the state of your cluster, then make or request changes where needed. Each controller tries to move the current cluster state closer to the desired state

Kubernetes provides the following controllers:

Deployment