Skip to content

Instantly share code, notes, and snippets.

@dm7
dm7 / .eslintrc.json
Created November 12, 2020 05:12 — forked from leny/.eslintrc.json
ESLint config file for node.js + ES6 projects.
{
"env": {
"node": true,
"es6": true
},
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParameters": true,
@dm7
dm7 / devenvinstall.sh
Created July 22, 2020 06:22 — forked from SkylarGill/devenvinstall.sh
Setup for ubuntu dev environment
# install dotnet core sdk
wget -q https://packages.microsoft.com/config/ubuntu/19.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt -y install apt-transport-https
sudo apt update
sudo apt -y install dotnet-sdk-3.1 dotnet-sdk-3.0 dotnet-sdk-2.1 dotnet-sdk-2.2
#install mono
sudo apt install gnupg ca-certificates
@dm7
dm7 / .eslintrc.js
Created July 3, 2020 10:18 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {

Creating the user index.

Since we are dealing with one single node in my example the replicas are set to 0

if you had more than 1 node in the cluster the default for number of replicas is 1

and will actually put an exact replica of your data on the second node. The shards

by default is 5 and this basically how elasticsearch can quickly find your data by

sharding it out to multiple nodes.

curl -XPUT http://localhost:9200/user?pretty=true -H 'Content-Type: application/json' -d ' {

@dm7
dm7 / nodejs-cheatsheet.js
Created December 21, 2019 11:26 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@dm7
dm7 / README.md
Created December 10, 2019 10:16 — forked from robertpainsi/README.md
How to reopen a pull-request after a force-push?

How to reopen a pull-request after a force-push?

Precodinitions

  • You need the rights to reopen pull requests on the repository.
  • The pull request hasn't been merged, just closed.

Instructions

  1. Write down the current commit hash of your PR-branch git log --oneline -1 <PR-BRANCH>
  2. Write down the latest commit hash on github before the PR has been closed.
  3. git push -f origin :
@dm7
dm7 / ARCH_INSTALL.MD
Created November 29, 2019 02:51 — forked from heppu/ARCH_INSTALL.MD
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync

Boot from USB and set prepare system

loadkeys <your-keymap>
@dm7
dm7 / gitconfig
Created November 6, 2019 17:35 — forked from arya-oss/gitconfig
[user]
name = rajmani1995
email = [email protected]
[credential]
helper = cache --timeout=3600
[alias]
aliases = config --get-regexp '^alias\\.'
br = branch
branch-name = rev-parse --abbrev-ref HEAD
ci = commit -m
@dm7
dm7 / INSTALL.md
Created November 6, 2019 17:33 — forked from arya-oss/INSTALL.md
Ubuntu 16.04 Developer Tools installation

Ubuntu 16.04 Developer Tools Installation

First things first !

sudo apt update
sudo apt upgrade

Standard Developer Tools

sudo apt-get install build-essential git