Skip to content

Instantly share code, notes, and snippets.

@fardjad
fardjad / how-to-enable-dark-theme-on-elementaryos.md
Last active December 18, 2023 05:23
[How to Enable Dark Theme on ElementaryOS] Instructions for enabling dark theme (almost) everywhere on ElementaryOS #elementary #linux #dark

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 / minikube-on-wsl2-with-podman.md
Last active November 7, 2023 02:14
[Minikube on WSL2 with Podman] Tips for running a local development Kubernetes cluster on WSL2 with Podman #wsl2 #minikube #podman #kubernetes #docker
@fardjad
fardjad / faas-cli-multi-platform-run.md
Last active October 16, 2023 19:50
[faas-cli Multi-Platform Run] Example of running a function on open-faas/faasd with faas-cli #faas_cli #open_faas #faasd

Steps

DOCKER_REGISTRY="registry.example.com"
PROJECT_NAME="hello-world"

# List the templates
faas-cli template store list --official --recommended --verbose=true

TEMPLATE="node18"
@fardjad
fardjad / find-node-by-line-number-in-node-tree-sitter.md
Last active June 9, 2023 23:58
[Find node by line-number in node-tree-sitter] An example of finding a node by line-number with node-tree-sitter #TreeSitter #Node

Example

Requirements

  • Node.js 18+
  • tree-sitter
  • tree-sitter-cpp

index.mjs

@fardjad
fardjad / Unity3DObjectDragHandler.cs
Last active January 15, 2023 23:34
[Unity3DObjectDragHandler.cs] Handles drag and drop for a 3D object in Unity3D #unity #csharp #draganddrop
using UnityEngine;
public class Unity3DObjectDragHandler : MonoBehaviour
{
public Camera camera;
public void Start()
{
}
@fardjad
fardjad / how-to-install-parallels-tools-on-manjaro.md
Last active September 29, 2022 09:51
[How to Install Parallels Tools on Manjaro] Steps required to install Paralells Tools on Manjaro Linux #linux #manjaro #parallelsdesktop #macos

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 / doublecmd-explorer-integration.reg
Last active April 10, 2022 09:28
[doublecmd-explorer-integration.reg] Double Commander Explorer Integration #windows #registry #doublecmd
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Drive\shell]
@="open"
[HKEY_CLASSES_ROOT\Drive\shell\open]
[HKEY_CLASSES_ROOT\Drive\shell\open\command]
@="C:\\Program Files\\Double Commander\\doublecmd.exe -C \"%1\""
@fardjad
fardjad / how-to-install-ice-ssb-manager-on-debian.md
Last active March 8, 2022 22:45
[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

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 / rpi-toolchain.md
Last active August 4, 2021 13:48
[How to Build an ARM Toolchain on OSX for RaspberryPI] WIP #raspberrypi #toolchain #osx #arm

Building an ARM Toolchain on OSX for RaspberryPI

Requirements

  1. MacPorts

     sudo port selfupdate
     sudo port upgrade outdated
    
  2. GCC prerequisites

@fardjad
fardjad / center-active-window.ahk
Last active June 29, 2021 03:19
[center-active-window.ahk] An AutoHotkey script to make WinKey+C center active window #autohotkey #windows
; 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
}