Skip to content

Instantly share code, notes, and snippets.

View SanjayBoricha's full-sized avatar
:octocat:
Just Coding

Sanjay Boricha SanjayBoricha

:octocat:
Just Coding
View GitHub Profile
/**
* Collapsible - A plug and play plugin for expanding and
* collapsing elements (i.e. accordion) on a website.
*/
let Collapsible;
(function() {
'use strict';
/**
@SanjayBoricha
SanjayBoricha / git-configs.md
Last active April 21, 2020 10:48
Some important commands for git

set commit email for one repo : git config user.email "your@email.com" set commit email global : git config --global user.email "your@email.com"

set commit email for one repo : git config user.name "your-name" set commit email global : git config --global user.name "your-name"

store git password when using https :

  • for one repo : git config credential.helper store
  • for set globally : git config --global credential.helper store (run git pull and enter your credential)
@media print {
tr.vendorListHeading {
background-color: #1a4567 !important;
-webkit-print-color-adjust: exact;
}
}
@media print {
.vendorListHeading th {
color: white !important;
const formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2
});
console.log(formatter.format(1000)); // "$1,000.00"
formatter.format(10); // "$10.00"
formatter.format(123233000); // "$123,233,000.00"
<template>
<div class="flex items-center mb-1 max-w-lg">
<div class="flex-1 hidden md:block">
<span>E-mail</span>
</div>
<div class="flex-1">
<input
class="appearance-none border-b border-r rounded w-full p-2 placeholder-themeGray-200 text-themeGray-400 leading-tight focus:outline-none focus:bg-white rounded-tr-none rounded-bl-none"
type="email"
placeholder="E-mail"
{
"presets": [ "next/babel" ],
"plugins": [ "inline-react-svg" ]
}
// 0-9, a-z, A-Z, one special character :
const regex = (?=.[a-z])(?=.[A-Z])(?=.[0-9])(?=.[!@#$%^&]).{8,});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
import axios from "axios";
axios.defaults.baseURL = 'URL';
axios.interceptors.request.use(
config => {
const token = localStorage.getItem("token");
if (token !== null) {
config.headers.Authorization = token;
export const uploadImage = file => dispatch => {
const data = new FormData();
data.append('file', file, file.name);
axios({
method: 'POST',
url: path,
data: data,
headers: {
'Content-Type': `multipart/form-data; boundary=${data._boundary}`