Custom domain in IIS Express

https://average-joe.info/custom-domain-iis-express/

in:
%UserProfile%\Documents\IISExpress\config\applicationhost.config

add

or change existing to:

and change windows/system32/drivers/etc/hosts
127.0.0.1 mycustomlocalhost

Leave a comment

Filed under Technical Links

angular ui-sortable

https://github.com/angular-ui/ui-sortable

Leave a comment

Filed under Technical Links

Json in SQL Server

https://www.simple-talk.com/sql/t-sql-programming/consuming-json-strings-in-sql-server/

Leave a comment

Filed under Technical Links

Language implementation Grammar parser

https://irony.codeplex.com/

Leave a comment

Filed under Technical Links

Mongo in linux Azure Vm

Update OS: sudo yum update

Setup Disks:
  Attach disk in azure portal
  See attached disks: sudo grep SCSI /var/log/messages
  Create new device: sudo fdisk /dev/sdc
    n-new partition
    p-primary
    1-make first partition
    enter to accept default cylinders
    p-to see details
    w-to write settings
  Create file system for device: sudo mkfs -t ext4 /dev/sdc1
  Create directory to mount it: sudo mkdir /datadrive
  Mount drive: sudo mount /dev/sdc1 /datadrive
  Add new drive to /etc/fstab to remount after reboot:
    Find the UUID of the drive: sudo -i blkid
    Add new file system info to fstab: UUID=33333333-3b3b-3c3c-3d3d-3e3e3e3e3e3e /datadrive ext4 defaults 1 2
    Test file system: sudo umount /datadrive /// sudo mount /datadrive
Make mongouser the owner of datadirectory: sudo chown `id -u` /datadrive/
Create data directory: mkdir -p /datadrive/data

Install Mongo:
  Add Repository Information: using nano copy in /etc/yum.repos.d/mongodb.repo
    [mongodb]
    name=MongoDB Repository
    baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
    gpgcheck=0
    enabled=1
Update local package database: sudo yum update
Install mongo: sudo yum install mongo-10gen mongo-10gen-server

Configure mongo for each instance: in /etc/mongod.conf
  port = 27018
  dbpath = /datadrive/data
  logpath = /datadrive/mongod.log
  replSet = mongors

Start mongo: mongod –config /etc/mongod.conf
to see the logs: tail –f /datadrive/mongod.log

Configure Replica set:
Connect to 1 instance: mongo –host mongodbrs.cloudapp.net –port <port number>
conf = {
_id : “mongors”,
members : [
{_id:0, host:”mongodbrs.cloudapp.net:27018"},
{_id:1, host:”mongodbrs.cloudapp.net:27019"},
{_id:2, host:”mongodbrs.cloudapp.net:27020"}]}
rs.initiate(conf)
rs.status()

Leave a comment

Filed under Technical Links

linux commands

ps -ef | grep mongod
killall mongod
kill mongod
service –status-all
service mongod start

configuration: /etc/mongod.conf
init script: /etc/rc.d/init.d/mongod

port = 27019
dbpath = /datadrive/data
logpath = /datadrive/mongod.log
replSet = mongors
start mongo: mongod –config /etc/mongod.conf
see log file: tail –f /datadrive/mongod.log
remove file: rm file

sudo nano /datadrive/mongod.log

~$ sudo bash
~$ cat /etc/passwd | grep mongodb
mongodb:x:117:65534::/home/mongodb:/bin/false

change false to bash

sudo su root

Leave a comment

Filed under Technical Links

pdfmake.org pdf generator

pdfmake.org pdf generator

Leave a comment

Filed under Technical Links