Skip to content

Instantly share code, notes, and snippets.

View jadia's full-sized avatar
💭
Progress beats Perfect.

Nitish Jadia jadia

💭
Progress beats Perfect.
View GitHub Profile
@jadia
jadia / docker-compose.yaml
Created January 2, 2021 22:38
Run postgres and pgAdmin on Docker for practice
version: '3'
services:
postgres:
image: postgres
hostname: postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
@jadia
jadia / docker-compose.jenkins-dind.yml
Created July 29, 2020 03:42 — forked from adelmofilho/docker-compose.jenkins-dind.yml
Docker-in-Docker approach to run Jenkins as a Docker container
# This docker-compose file intent to create a multi-container application
# that runs a Jenkins container connected via TLS to a Docker-in-Docker (dind) container as Docker daemon.
#
# Advice about this approach can be found at:
# http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
#
# As well discussion about another alternatives on this setup can be found at:
# https://forums.docker.com/t/using-docker-in-a-dockerized-jenkins-container/322/11
#
# Quick reference about Docker-in-Docker can be fount at:
@jadia
jadia / rename_with_suffix.md
Created May 27, 2020 15:51
Add suffix to file names

Add .zip suffix to all files starting with name test

bash -c "ls test* | xargs -I {} mv {} {}.zip"
@jadia
jadia / extract_libffmpeg.so.md
Last active July 5, 2020 05:05
Facebook cannot run videos in Opera and firefox

REFER TO BELOW video_fix_opera.md FILE FIRST. THIS IS A BACKUP METHOD IF THAT METHOD DOESN'T WORK

If you do not get the file from your system, you can extract the file from the chromium package. Follow below instructions to get the package. Original post. Copied here, just in case owner decides to delete the gist.

Install libffmpeg.so in vivaldi

This short instruction shows how to install libffmpeg.so in vivaldi to play e.g. mp4 videos.

@jadia
jadia / grep_through_files.md
Created March 13, 2020 11:54
Grep through all the files in the folder

Grep through all the files in the folder

Search through directory and sub-directories

grep -r stuffToSearch ./*

Search only specific files

@jadia
jadia / qemu_image_convert.md
Created October 16, 2019 07:46
Convert VDI images to IMG or QCOW2 in QEMU

Convert VDI images to IMG or QCOW2 in QEMU

qemu-img convert -f vdi -O qcow2 vm.vdi vm.qcow2
@jadia
jadia / gpg_error.md
Last active March 28, 2020 16:43
Github, SSH - gpg failed to sign the data

GPG sign issue when commiting the message

error: gpg failed to sign the data
fatal: failed to write commit object

sudo apt install -y pinentry-tty && \
sudo update-alternatives --config pinentry
@jadia
jadia / tmux_centos.md
Last active September 6, 2019 07:30
Install tmux latest version in CentOS 7

Install Tmux in CentOS 7

Remove tmux 1.8 and install

sudo yum remove tmux -y && \
git clone https://github.com/tmux/tmux.git && \
sudo yum install libevent-devel -y && \
sudo yum install ncurses-devel.x86_64 -y && \
cd tmux && \
@jadia
jadia / openvpn_on_openvz.md
Created August 9, 2019 14:33
Using OpenVPN on OpenVZ based machine

Using OpenVPN on OpenVZ based machine

Comment out the LimitNPROC line in /lib/systemd/system/openvpn@.service.

Then run systemctl daemon-reload

Restart the openvpn service

systemctl restart openvpn@server.service

@jadia
jadia / locale_issue_zsh.md
Created August 3, 2019 07:14
zsh (anon):12: character not in range error

zsh | (anon):12: character not in range

Solution:

sudo apt-get install -y language-pack-en
sudo update-locale

Then zsh starts working!