Skip to content

Instantly share code, notes, and snippets.

View farzadso's full-sized avatar

Farzad Soltani farzadso

View GitHub Profile

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

farzadso / gaps.sql
Created December 4, 2021 17:46 — forked from miguelmota/gaps.sql
PostgreSQL find gaps in sequence
-- table is 'blocks'
-- column is 'number'
gap_start, gap_end FROM (
SELECT number + 1 AS gap_start,
next_nr - 1 AS gap_end
SELECT number, lead(number) OVER (ORDER BY number) AS next_nr
FROM blocks

First off, credit goes to for leading the way here.

In a very similar approach, copy the files from the Parallels installation media and drop them in a folder somewhere (eg. ~/parallels_fixed)

Go to the kmods directory (cd ~/parallels_fixed/kmods) and extract the files (tar -xzf prl_mod.tar.gz)

Remove prl_mod.tar.gz file from that directory (rm prl_mod.tar.gz)

farzadso /
Created June 23, 2019 12:45 — forked from rudolfratusinski/
Parallels Tools fix for Ubuntu 18.04 and other Linux distributions with Kernel version >= 4.15


  • In open Ubuntu 18.04 machine click Parallels Actions -> "Install Parallels Tools"

  • A "Parallels Tools" CD will popup on your Ubuntu desktop.

  • Open it by double mouse click, copy all the content to a new, empty directory on a desktop, name it for e.g. "parallels_fixed"

  • Open terminal, change directory to parallels_fixed (cd ~/Desktop/parallels_fixed)

  • Make command line installer executable (chmod +x install)

  • Change directory to "installer" (cd installer)

  • Make few other scripts executable: chmod +x installer.* *.sh prl_*

farzadso / gist:c2981ca64a7ae054a04d629fad9935cb
Created August 7, 2018 17:55 — forked from kitek/gist:1579117
NodeJS create md5 hash from string
var data = "do shash'owania";
var crypto = require('crypto');
updateStepFourProps(type, operation, data) {
let localData = [];
if (operation === 'add') {
if (type === 'educationalBackground') {
// Create Local Copy
localData = this.state.educationalBackground;
// Push Data In Local Copy
} else if (type === 'academicCertificates') {
// Create Local Copy