Skip to content

Instantly share code, notes, and snippets.

@sureshshrestha
sureshshrestha / code.md
Created Jan 10, 2020 — forked from gopalindians/code.md
Jetbrains IntelliJ IDEA 2019.2.4 Activation code
View code.md

Please make fork of this, as this can be removed by Github.com sooner or later.

CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsI

@sureshshrestha
sureshshrestha / js
Created Dec 31, 2018
Avoid mutation in js
View js
/*
In javascript array and object are mutable so to avoid mutation we need to use Spread Operator.
*/
// To add new element ('four') to an array.
const arr1 = [1,2,3];
const fourth = 'four';
const arr2 = [...arr1, fourth];
// Output for arr2: [1, 2, 3, "four"]
@sureshshrestha
sureshshrestha / txt
Created Oct 26, 2018
pip issue fix for 'ImportError: No module named _internal'
View txt
Error:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in <module>
from pip._internal import main
ImportError: No module named _internal
Fix:
$ sudo rm /usr/local/bin/pip*
$ sudo apt remove python-pip
$ sudo apt install python-pip
View txt
1. Start vault
$ vault server -dev
2. Fetch data
$ vault kv get secret/password
3. Add data from file
$ vault kv put secret/password value=@laudio_admin.txt
@sureshshrestha
sureshshrestha / txt
Created Sep 14, 2018
Coding notes for Windows environment
View txt
# Starting MongoDB in windows
"C:\Program Files\MongoDB\Server\3.0\bin\mongod.exe" --dbpath="c:\data\db"
You can’t perform that action at this time.