Skip to content

Instantly share code, notes, and snippets.

View 2arunpmohan's full-sized avatar

ARUN P MOHAN 2arunpmohan

  • Factweavers
  • Cochin
View GitHub Profile
@2arunpmohan
2arunpmohan / configFileChanges.yml
Created September 8, 2016 06:15
XMLHttpRequest cannot load http://localhost:9233/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
network.host: 0
http.port: 9233
http.cors.enabled: true
http.cors.allow-origin: '*'
@2arunpmohan
2arunpmohan / defaultSizeChanger.md
Created September 8, 2016 06:19
"from" size default limit 10000
@2arunpmohan
2arunpmohan / start mySql.md
Created September 8, 2016 06:37
mySql operations

start mysql in ubuntu mysql -u root -p (after entering this, we will be asked password. For office system it is "factweavers")

@2arunpmohan
2arunpmohan / new_gist_file_0
Created September 8, 2016 06:38
database operations mySql
list all databases in database
show databases;
create a database
create databaseName
@2arunpmohan
2arunpmohan / table operations mysql.md
Created September 8, 2016 06:43
table operations mySql

show the tables inside a database show tables;

create a table create table TableName(columndetails) eg: create table EmployeeDetails (PersonID int, LastName varchar(255), FirstName varchar(255), City varchar(255));

insert data to a table INSERT INTO EmployeeDetails (PersonID, LastName, FirstName, City) VALUES ('4005','Kallis','Jaques','Cape Town');

SCP operations

scp to factweavers

scp /var/www/html/teknion-ui.zip root@factweavers.com:~/../var/www/html

scp a file from factweavers

scp root@factweavers.com:/var/www/html/teknion-ui-new.zip /var/www/html/

#ZIP a folder zip -r new-name.zip folderName

@2arunpmohan
2arunpmohan / new_gist_file_0
Created September 8, 2016 06:59
netstat for information regarding port utilisation
#To know the ports and process utilisations
sudo netstat -ntlp
@2arunpmohan
2arunpmohan / mappings for attachment.sh
Created September 8, 2016 08:38
bash scripts for reference mapping for pdf attachments in elasticsearch
#!/bin/bash
if [ -z $1 ] ; then
echo "Please enter hostname"
exit
fi
hostname=$1
curl -XDELETE "http://$hostname:9175/pdf-attachment-04"
@2arunpmohan
2arunpmohan / mapping for suggest - 02.sh
Last active January 5, 2019 12:38
bash scripts for "suggest" mapping example of suggest implementation
#!/bin/bash
if [ -z $1 ] ; then
echo "Please enter hostname"
exit
fi
hostname=$1
curl -XDELETE "http://$hostname:9200/suggest-simple"