This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd tomcat/lib | |
java -cp catalina.jar org.apache.catalina.util.ServerInfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vagrant host will be assigned public IP | |
config.vm.network "public_network" | |
# private network, test locally as localhost only | |
config.vm.network "private_network", ip: "192.168.5.3" | |
# forwarding, can use localhost and host ip address | |
config.vm.network "forwarded_port", guest: 443, host: 5443 | |
config.vm.network "forwarded_port", guest: 8443, host: 9443 | |
config.vm.network "forwarded_port", guest: 22, host: 2200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant plugin list | |
638 vagrant plugin uninstall | |
639 vagrant plugin uninstall vagrant-vbguest | |
640 vagrant plugin list | |
641 vagrant reload |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone git@rcode.rockefeller.edu:webdev/Kiosks.git | |
cd Kiosks/ | |
rm -rf ./test | |
git rm test/* | |
git commit -m "removed test directory" | |
git push origin master | |
git filter-branch --tree-filter 'rm -rf test' --prune-empty HEAD | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d | |
echo test/ >> .gitignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt install ntpdate | |
sudo ntpdate ntp.ubuntu.com | |
sudo ntpdate time.nist.gov |0.amazon.pool.ntp.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// pass from file | |
var request = require('request'); | |
var fs = require('fs'); | |
var config = require('./config'); | |
const loadJsonFile = require('load-json-file'); | |
let obj = loadJsonFile.sync('./names.json'); | |
request.patch({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var emails = [ | |
{ id : 0, email: "xil@test.com", lname: "Kelly", lname: "Jim" }, | |
{ id : 1, email: "abc@test.com", lname: "Xu", lname: "Dave" }, | |
{ id : 2, email: "fill@test.com", lname: "Cato", lname: "Harry" }, | |
]; | |
// print not sorted | |
for (i=0; i < emails.length; i++) { | |
console.log(emails[i].email+', '+emails[i].lname+', '+ emails[i].fname); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Vagrant was unable to mount VirtualBox shared folders. This is usually because the filesystem "vboxsf" is not available. This filesystem is made available via the VirtualBox Guest Additions and kernel module. | |
#vagrant plugin install vagrant-vbguest | |
#vagrant reload |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (string.indexOf(',') > -1) { | |
array = string.split(',') | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl localhost:9200/_nodes/stats?pretty|grep -A 10 "jvm" | |
curl localhost:9200/_cluster/health?pretty | |
curl -X GET http://localhost:9200/_cat/indices | |
curl 'http://localhost:9200/_cat/nodes?v' |