Skip to content

Instantly share code, notes, and snippets.

fardjad /
Created Feb 8, 2019
[] Find binary files in a git repo #git #bash
git_files=$(git ls-files)
for git_file in $git_files; do
encoding=$(file --mime-encoding "$git_file")
type=$(echo "$encoding" | awk -F ': ' '{ print $2 }')
if [ "$type" == "binary" ]; then
echo $git_file
fardjad / Unity3DObjectDragHandler.cs
Last active Feb 7, 2019
[Unity3DObjectDragHandler.cs] Handles drag and drop for a 3D object in Unity3D #unity #csharp #draganddrop
View Unity3DObjectDragHandler.cs
using UnityEngine;
public class Unity3DObjectDragHandler : MonoBehaviour
public Camera camera;
public void Start()
fardjad / doublecmd-explorer-integration.reg
Last active Feb 7, 2019
[doublecmd-explorer-integration.reg] Double Commander Explorer Integration #windows #registry #doublecmd
View doublecmd-explorer-integration.reg
Windows Registry Editor Version 5.00
@="C:\\Program Files\\Double Commander\\doublecmd.exe -C \"%1\""
fardjad /
Last active Aug 30, 2020
[DSL/LTE Auto-switch Setup] #openwrt #dsl #lte #multiwan

DSL/LTE Auto-switch Setup


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.


fardjad / bitmeter.service
Last active Feb 7, 2019
[bitmeter.service] Modified "/usr/lib/systemd/system/bitmeter.service" file for ArchLinux #archlinux #systemd #bitmeter
View bitmeter.service
Description=Packet Capture Service for BitMeter-OS
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
WinGetTitle, windowName, A
CenterWindow(windowTitleVariable) {
WinGetPos,,, Width, Height, %windowTitleVariable%
WinMove, %windowTitleVariable%,, (A_ScreenWidth - Width) / 2, (A_ScreenHeight - Height) / 2
fardjad / ms-aio-media-keyboard-workaround.ahk
Last active Feb 7, 2019
[ms-aio-media-keyboard-workaround.ahk] Microsoft AIO Media Keyboard missing keys workaround #autohotkey #windows
View ms-aio-media-keyboard-workaround.ahk
* Copyright (c) 2015 Fardjad Davari
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
fardjad / .!php-sample-with-grunt-composer-phpunit-and-continuos-testing
Last active Feb 8, 2019
[PHP sample with Grunt, Composer, PHPUnit, and continuos testing] #php #grunt #composer #phpunit
fardjad / .!password-authentication-with-mongoose
Last active Apr 29, 2020
[Password Authentication with Mongoose] #nodejs #mongodb #authentication
fardjad /
Last active Feb 7, 2019
[iTerm2 key bindings for better navigation] #iterm2 #macos

⌘→: 0x05

⌘←: 0x01

⌘←Delete: 0x15

⌥→: ^[f

⌥←: ^[b