Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am unrealnerd on github.
* I am xarjunshetty (https://keybase.io/xarjunshetty) on keybase.
* I have a public key ASAO1OM9Gi7NzSoafwbZWVrSxyTQ-5qXqvqimuEWjmMYCAo
To claim this, I am signing this object:
@unrealnerd
unrealnerd / vim.md
Last active November 29, 2020 16:23
vi shortcuts

vi

Exploring

# lists file
:e <tab><tab>
# open file in Tab
:Te <tab><tab>
# open file in Split window
@unrealnerd
unrealnerd / gonotes.md
Last active February 27, 2021 13:54
go notes

go Notes

  • go Commands
    • running a go go run main.go
    • adding package go get -u -v github.com/packagename
  • go doesn take responsibility of implicitly converting types and get blamed on loss of data :)
  • multiple args func sum(nums ...int) { use range to retreive the args inside the func
  • go needs no vm like java and .net and is procedural and statically typed unlike oop
  • wire needs this line //+build wireinject with new line post this other wise the file gets inlcuded and complains redeclared block
  • wire.exe path should be included in the env path variable

simply notes

Nuget

  • to package the library dotnet pack .
  • pack with nuspec number dotnet pack featureprovider.core.csproj -p:NuspecFile=.nuspec
  • push the package to local repo dotnet nuget push .\bin\Debug\FeatureProvider.1.0.0.nupkg -s C:\localnugetpackages\
  • clean the nuget cache dotnet nuget locals --clear all
  • adding he package to project dotnet add package featureprovider -s c:\localnugetpackages or if already added dotnet restore
  • pushing the package to nuget.org dotnet nuget push bin/Debug/FeatureProvider.1.0.0.nupkg -k -s https://api.nuget.org/v3/index.json
@unrealnerd
unrealnerd / angularnotes.md
Last active December 8, 2020 10:41
notes on angular

Angular Notes

  • To create a new component,

    ng generate component searchbox --skipTests=true --module app

  • create component in a specific folder ng g c --module app templates\card-image

Agular forms and dialog with angular material

  • Since tensorflow is not supported with python 3.7 downgrade to conda python=3.6
  • running rasa nlu python -m rasa_nlu.train -c nlu_config.yml --data data/phrases.md -o models --project phrases --verbose
  • running the api server for trained nlu models
    • python -m rasa_nlu.server --path models/
  • curl -XPOST http://localhost:5000/parse -d '{"q":"tell me a phrase","project":"phrases"}'

Notes on MongoDB

  • To start mongodb create a folder and then use the following command mongod --dbpath <path to data folder>
  • To import data from a json file .\mongoimport.exe --db phrasesdb --collection phrases --file C:\code\roulette\data\phrases.json --jsonArray
  • show all databases show dbs
  • current database db
  • create database use <dbname>
  • create colletion db.createCollection()

Notes On Docker

  • Set up an external network switch Steps
  • Creating a docker machine

    docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" default

  • When we get errror "Verify that the Virtual Machine Management service on the computer is running" run this comand

    MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof

  • List docker machines

version: '3'
services:
heartbeatwebapp:
build:
context: .
dockerfile: Dockerfile
image: heartbeatapp
container_name: heartbeatwebapp
environment:
- ASPNETCORE_ENVIRONMENT=Development