Skip to content

Instantly share code, notes, and snippets.

pavelbinar / index.html
Created Jun 17, 2020
Dynamically add script tag with unique src
View index.html
var now = new Date().getTime();
var newScript = document.createElement("script");
newScript.src = "<%= htmlWebpackPlugin.options.mainURL %>?t=" + now;
var target = document.getElementsByTagName("body")[0];
pavelbinar /
Last active Aug 24, 2019
Delete all node_modules folders

Delete all node_modules folders

Recursively delete all node_modules folders nested in the current folder.

find . -name "node_modules" -type d -prune -exec rm -rf '{}' +

Since many node_modules contain another node_modules it is more effective to delete just top level folder. use -maxdepth 2 to limit that depth. Adjust according to your foldr structure.

function color_my_prompt {
local __user_and_location="\n\[\e[32;1m\](\[\e[37;1m\]\u\[\e[32;1m\])-(\[\e[37;1m\]\w\[\e[32;1m\])"
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`'
local __prompt="\n$\[\e[0m\]"
export PS1="$__user_and_location $__git_branch $__prompt "
pavelbinar /
Created May 24, 2017
Add Public SSH Key to Remote Server in a Single Command
cat ~/.ssh/ | ssh user@hostname 'cat >> .ssh/authorized_keys'
sudo fdisk -l
sudo dd if=ubuntu-17.04-beta2-desktop-amd64.iso of=/dev/sdb bs=512k

Keybase proof

I hereby claim:

  • I am pavelbinar on github.
  • I am pavelbinar ( on keybase.
  • I have a public key ASBhSGdfFpYwMsphoCqEV1u2570Y05YkNlvjFlpb7rtGZAo

To claim this, I am signing this object:

View seting.xml
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="">
pavelbinar /
Last active Jul 18, 2021 — forked from bmaeser/subtitle-extract.txt
Extract subtitles from .mkv files on Mac OS X

Extract Subtitles From .mkv

These instructions shall work on Mac OS X and Linux.

Install mkvtoolnix (Mac OS X)

Installation via Homebrew:

brew install mkvtoolnix
pavelbinar /
Last active Jun 7, 2016
Download MP3 from YouTube
# Source:
youtube-dl --extract-audio --audio-format mp3 <video URL>