Skip to content

Instantly share code, notes, and snippets.

Avatar

Fardjad Davari fardjad

View GitHub Profile
@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 / debian-sid-with-systemd-on-wsl2.md
Last active Jul 10, 2020
[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 / 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

@fardjad
fardjad / minikube-on-wsl2-with-podman.md
Last active Jul 18, 2020
[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 / how-to-run-photonos-on-virtualbox.md
Created Aug 28, 2019
[How to run PhotonOS 3+ on VirtualBox] #virtualbox #photonos
View how-to-run-photonos-on-virtualbox.md

How to run PhotonOS 3+ on VirtualBox

Steps

Create the VM

  1. Download the latest OVA (I downloaded the one with UEFI support).

  2. Extract the OVA and grab the VMDK file.

    tar xf photon-*.ova
    
@fardjad
fardjad / how-to-use-an-insecure-local-docker-registry-with-minikube.md
Last active Aug 1, 2019
[How to Use an Insecure Local Docker Registry with Minikube] Steps required to use an insecure docker registry running on localhost with Minikube for development #docker #minikube #development #docker_registry
View how-to-use-an-insecure-local-docker-registry-with-minikube.md

How to Use an Insecure Local Docker Registry with Minikube

Steps

  1. Run a local registry server

  2. Log into the Minikube VM with SSH (minikube ssh)

  3. Make sure GatewayPorts option is set to yes in /etc/ssh/sshd_config (and restart the SSH server if necessary)

  4. Forward the exposed registry port on your host machine to the Minikube VM with SSH:

     ssh -i $(minikube ssh-key) -N docker@$(minikube ip) -R 5000:localhost:5000
    
@fardjad
fardjad / how-to-install-homebrew-on-manjaro.md
Last active Nov 25, 2020
[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 / how-to-install-parallels-tools-on-manjaro.md
Last active Nov 2, 2020
[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 / low-level-async-buffered-read.js
Last active Feb 18, 2019
[low-level-async-buffered-read.js] Low-level async buffered read from file with Node.js #nodejs #async #file
View low-level-async-buffered-read.js
const fs = require("fs");
const EventEmitter = require("events").EventEmitter;
const read = (fileHandle, bufferSize, position, emitter) => {
const buffer = Buffer.alloc(bufferSize);
fs.read(
fileHandle,
buffer,
0,
You can’t perform that action at this time.