Skip to content

Instantly share code, notes, and snippets.

View yashvekaria's full-sized avatar
♻️
Evolving

Yash Vekaria yashvekaria

♻️
Evolving
View GitHub Profile
@yashvekaria
yashvekaria / mime.txt
Created May 6, 2020 07:23
Upload File Mime type
Well this is embarrassing... I found the solution I was looking for and it couldn't be simpler. I used the following code to get the desired result. Hope this helps someone in the future. Thanks everyone for your help.
<input id="fileSelect" type="file" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" />
Valid Accept Types:
For CSV files (.csv), use:
<input type="file" accept=".csv" />
For Excel Files 97-2003 (.xls), use:
<input type="file" accept="application/vnd.ms-excel" />
@yashvekaria
yashvekaria / pgAdminContainer.txt
Created May 1, 2020 06:08
pgAdmin 4 (Official Container) - A Docker Container containing pgAdmin running in server mode over HTTP or HTTPS
Ref - https://www.pgadmin.org/download/pgadmin-4-container/
Command
sudo docker run -p 5050:80 --restart=always -d -v /home/dpc2/pgadmin:/var/lib/pgadmin/storage -e 'PGADMIN_DEFAULT_EMAIL=postgres' -e 'PGADMIN_DEFAULT_PASSWORD=avesta' dpage/pgadmin4
@yashvekaria
yashvekaria / Set Screen Resolution.txt
Last active April 6, 2020 06:27
Set Screen Resolution in 2nd monitor - Ubuntu 14.04
Step 1
xrandr - check the monitor name, here in our example it is - eDP-1
Step 2
cvt 1600 900
Step 3
sudo xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
Step 4
@yashvekaria
yashvekaria / email.html
Last active November 5, 2019 06:28
Sendgrid - email template - invitation
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" data-dnd="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
<!--[if !mso]><!-->
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<!--<![endif]-->
<!--[if (gte mso 9)|(IE)]><style type="text/css">
@yashvekaria
yashvekaria / rbenv.txt
Created December 23, 2017 11:47
zsh: command not found: rbenv
If you just switched from bash to zsh and have issues with rbenv and gem, then you should move rbenv initialization to ~/.zshenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshenv
$ echo 'eval "$(rbenv init -)"' >> ~/.zshenv
$ echo 'source $HOME/.zshenv' >> ~/.zshrc
$ exec $SHELL