Skip to content

Instantly share code, notes, and snippets.

View nsisodiya's full-sized avatar

Narendra Sisodiya nsisodiya

View GitHub Profile
@nsisodiya
nsisodiya / settings.json
Created May 28, 2019 08:54
vscode setting backup
{
"git.autofetch": true,
"git.enableSmartCommit": true,
"eslint.options": {
"configFile": "eslintrc.js"
},
"explorer.confirmDragAndDrop": false,
"editor.formatOnType": false,
"prettier.singleQuote": true,
"workbench.colorCustomizations": {
function changeMac() {
local mac=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
sudo ifconfig en0 ether $mac
sudo ifconfig en0 down
sudo ifconfig en0 up
echo "Your new physical address is $mac"
}
@nsisodiya
nsisodiya / .eslintignore
Created April 30, 2019 08:39
Pre-Commit Hook
node_modules
ignore.js
dist
gatsby-config.js
src/components/seo.js
.cache
public
build
module.exports = {
useTabs: false, // Indent lines with tabs instead of spaces.
printWidth: 120, // Specify the length of line that the printer will wrap on.
tabWidth: 2, // Specify the number of spaces per indentation-level.
singleQuote: true, // Use single quotes instead of double quotes.
jsxSingleQuote: true,
bracketSpacing: true,
arrowParens: 'always',
proseWrap: 'always',
htmlWhitespaceSensitivity: 'ignore',
#!/usr/bin/env sh
echo "====== Running After Build Scripts ========"
echo "0. === moving public to build ==="
mv public build
echo "1. === Copy index.html to 200.html ==="
cp build/index.html build/200.html
echo -e "Copied\n\n\n"
save-exact=true
save=true
npm install --save esm nodemon
@nsisodiya
nsisodiya / package.json
Created April 28, 2019 19:22
Nodemon ESM and inspect
{
"scripts": {
"start": "nodemon -r esm --inspect-brk --inspect=0.0.0.0:9229 src/server.js",
"test": "echo \"Error: no test specified\" && exit 1"
}
}
{
"name": "Narendra",
"age": 32,
"place": {
"name": "Delhi",
"pin": "110017"
},
"likes": [
"Apple",
"Banana",
@nsisodiya
nsisodiya / install-mtr-macos.sh
Last active April 27, 2019 05:53
Install MTR on MacOs
brew install mtr
brew link mtr # This might fail, this is why following command are added.
sudo ln -s /usr/local/Cellar/mtr/0.92/sbin/mtr /usr/local/bin/mtr
sudo ln -s /usr/local/Cellar/mtr/0.92/sbin/mtr-packet /usr/local/bin/mtr-packet