This file contains 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
/* Create a webhook in your GIT repo and put your IP-ADDRESS:1340 | |
* select content-type : application/json | |
* do a npm install github-webhook-handler | |
* to start the server - node hook.js | |
* | |
*/ | |
var http= require("http"); | |
var exec = require('child_process').exec; |
This file contains 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
{"results":[{"id":"1","iso":"AF","name":"AFGHANISTAN","nicename":"Afghanistan","iso3":"AFG","numcode":"4","phonecode":"93"},{"id":"2","iso":"AL","name":"ALBANIA","nicename":"Albania","iso3":"ALB","numcode":"8","phonecode":"355"},{"id":"3","iso":"DZ","name":"ALGERIA","nicename":"Algeria","iso3":"DZA","numcode":"12","phonecode":"213"},{"id":"4","iso":"AS","name":"AMERICAN SAMOA","nicename":"American Samoa","iso3":"ASM","numcode":"16","phonecode":"1684"},{"id":"5","iso":"AD","name":"ANDORRA","nicename":"Andorra","iso3":"AND","numcode":"20","phonecode":"376"},{"id":"6","iso":"AO","name":"ANGOLA","nicename":"Angola","iso3":"AGO","numcode":"24","phonecode":"244"},{"id":"7","iso":"AI","name":"ANGUILLA","nicename":"Anguilla","iso3":"AIA","numcode":"660","phonecode":"1264"},{"id":"8","iso":"AQ","name":"ANTARCTICA","nicename":"Antarctica","iso3":null,"numcode":null,"phonecode":"0"},{"id":"9","iso":"AG","name":"ANTIGUA AND BARBUDA","nicename":"Antigua and Barbuda","iso3":"ATG","numcode":"28","phonecode":"1268"},{"id":"1 |
This file contains 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
Make sure that you added you /bin directory to you system variable PATH | |
D:\mongodb\bin>mongod --remove | |
First I executed this command after opening command prompt as administrator: | |
D:\mongodb\bin>mongod --dbpath=D:\mongodb --logpath=D:\mongodb\log.txt --install | |
After that right there in the command prompt execute: | |
services.msc |
This file contains 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
<html> | |
<head> | |
<title> | |
Socket Testing | |
</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.6.0/socket.io.min.js"></script> | |
<script type="text/javascript"> |
This file contains 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
@echo off | |
REM move into the backups directory | |
CD C:\backup | |
REM Create a file name for the database output which contains the date and time. Replace any characters which might cause an issue. | |
set filename=database %date% %time% | |
set filename=%filename:/=-% | |
set filename=%filename: =__% | |
set filename=%filename:.=_% |
This file contains 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
<VirtualHost IP:80> | |
ServerName xyz.com | |
ServerAlias www.xyz.com | |
DocumentRoot /var/www/xyz/data/www/xyz.com | |
ServerAdmin webmaster@xyz.com | |
DirectoryIndex index.html index.php | |
<!--------------- stuff which is placed in this file | |
ProxyRequests off | |
<Proxy *> |
This file contains 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
I followed these two blogs to install server | |
1. http://koo.fi/blog/2015/03/19/openstreetmap-nominatim-server-for-geocoding/#Compile_Nominatim | |
This explains ( and is the main blog which I followed) various steps | |
2. https://www.linuxbabe.com/linux-server/openstreetmap-tile-server-ubuntu-16-04 | |
This explains how to setup swap files and install tiles if needed. | |
I will use Ubuntu 14.04 LTS as the platform. Just a basic install with ssh server. We will install Apache to serve http requests. Make sure you have enough disk space and RAM to hold the data and serve it efficiently. I used the Finland extract, which was about a 200 MB download. The resulting database was 26 GB after importing, indexing and adding Wikipedia data. The Wikipedia data probably actually took more disk space than the OSM data. My server has 4 GB RAM, which seems to be enough for this small data set. | |
1. Sofware requirements |
This file contains 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
For windows | |
first, find process id using his port | |
netstat -a -n -o | find "123456" | |
then, kill the process by id | |
taskkill /F /PID 3312 |
This file contains 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
openssl pkcs12 -in Certificates2.p12 -out pushcert.pem -nodes -clcerts |
This file contains 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
1. wget http://repo.ajenti.org/debian/key -O- | sudo apt-key add - | |
2. echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" | sudo tee -a /etc/apt/sources.list | |
3. sudo apt-get update && sudo apt-get install ajenti | |
4. sudo service ajenti restart | |
5. access using https://your-ip:8000 |