Skip to content

Instantly share code, notes, and snippets.


John Doe jarun

Block or report user

Report or block jarun

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jarun / Travis CI local install
Created Jun 5, 2016
How to install Travis CI locally on Ubuntu 16.04
View Travis CI local install
sudo apt install ruby ruby-dev
sudo gem install travis
# install path: /var/lib/gems/
jarun /
Last active Mar 1, 2020
Guide to disassemble


  • Compile the program in gcc with debug symbols enabled (-g)
  • Do NOT strip the binary
  • To generate assembly code using gcc use the -S option: gcc -S hello.c



jarun /
Last active Feb 15, 2020
Get the size to duration ratio of a media
#!/usr/bin/env sh
# Description: POSIZ compliant script to get the size to duration of a media file
# Requires: mediainfo, bc, ls
# For sorted output: | sort -rg
for file in *; do
# get duration in milliseconds->mins
ms=$(mediainfo --Inform="Video;%Duration%" "$file")
jarun /
Last active Jan 16, 2020
Random collection of useful commands

A collection of awesome commands, functions, aliases to save your time

Play random music from your media storage:
# BASH shell

    find $@ -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.webm" -o -iname "*.wma" \) | sort -R | head -n 100 | xargs -d "\n" smplayer > /dev/null 2>&1 &
jarun /
Created Jan 15, 2020 — forked from mateuspontes/
Migrate fish history to zsh shell (python 2.7)
import os
import re
def fish_to_zsh(cmd):
return (cmd.replace('; and ', '&&')
.replace('; or ', '||'))
with open(os.path.expanduser('~/.zsh_history.test'), 'a') as o:
with open(os.path.expanduser('~/.local/share/fish/fish_history')) as f:
for line in f:
jarun /
Created Nov 22, 2019
Useful vim tips
daw - delete a word (under cursor)
caw - delete a word (under cursor) and put in inset mode
jarun /
Last active Nov 20, 2019
How to connect to Termux from Ubuntu desktop
  1. Generate your ssh key pair on your desktop

    $ ssh-keygen
  2. Check your desktop IP address (say,

  3. Run ssh server on your desktop

  4. Copy the file to Termux over SCP

    $ scp arun@ ~/.ssh/authorized_keys

    You can stop ssh server on your desktop now

  5. Install ssh server on Termux

jarun /
Last active Nov 1, 2019
frequent man pages and help lookups for programming
jarun /
Last active Aug 8, 2019
notification on command completion (fish shell)

Instead of waiting for long commands to finish one can easily get notifications when they are complete. The following procdure shows how to set his in fish shell.

Requirements: fish shell, notify-send, xdotool

  • Add a new file vi ~/.config/fish/functions/ with the content below:
function fish_right_prompt
    if test $CMD_DURATION
        # Check if terminal window is hidden
jarun /
Created May 6, 2019
Split a music track into specified sub-tracks using ffmpeg
#!/usr/bin/env python3
Description: split a music track into specified sub-tracks using ffmpeg
target files are saved as variable bit-rate mp3 (lossless)
Usage: split <original_track> <track_list>
import shlex
You can’t perform that action at this time.