Skip to content

Instantly share code, notes, and snippets.

View zubair1024's full-sized avatar
🎯
Focusing

Zubair Ahmed zubair1024

🎯
Focusing
View GitHub Profile

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
SELECT
*
FROM
dbo. STATUS;
SELECT
leads.Ref,
@zubair1024
zubair1024 / groupByRetentionTickets.sql
Last active November 29, 2019 20:51
[Group By Retention Tickets] #sql #247
SELECT SUM(CONVERT(DECIMAL(29, 4), retentions.PremiumPolicy)) AS 'OldValue',
SUM(CONVERT(DECIMAL(29, 4), retentions.Premium)) AS 'NewValue',
SUM(CONVERT(DECIMAL(29, 4), retentions.PremiumDiff)) AS 'PremiumDiff',
retentions.OutcomeID,
users1.Username,
users1.FirstName,
users1.LastName,
retentions.CreatedDate
FROM dbo.Retention AS retentions
-- LEFT JOIN dbo.LEAD AS leads ON retentions.LeadID = leads.ID
--- Statuses Changes
SELECT leads.Ref,
statuses.Name,
leads.StatusDate,
leads.StatusChangeReason,
users.Username AS 'Status Changed By'
FROM dbo.LEAD AS leads
INNER JOIN dbo.STATUS AS statuses ON leads.StatusID = statuses.ID
LEFT JOIN dbo.Users AS users ON leads.StatusChangedBy = users.ID
WHERE(leads.StatusDate >= '2019-12-04'
@zubair1024
zubair1024 / ecosystem.json
Created December 8, 2019 14:06
Running PM2 as a window service
{
"apps": [
{
"name": "web",
"script": "C:\\ws\\engineer\\titan-web\\app.js",
"args": [],
"cwd": "C:\\ws\\engineer\\titan-web",
"merge_logs": true,
"instances": 1,
"exec_mode": "cluster_mode",

Setting up OSRM backend using Docker

  • Download map layer from source

wget https://download.geofabrik.de/asia/gcc-states-latest.osm.pbf

  • Pre-process the extract with the car profile and start a routing engine HTTP server on port 5000

docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/gcc-states-latest.osm.pbf

Setting up OSM tile server using Docker

  • Download map layers

wget https://download.geofabrik.de/asia/gcc-states-latest.osm.pbf

  • Make volume for osm data

docker volume create openstreetmap-data

Setup Nominatim using Docker

  • Download map layer

wget https://download.geofabrik.de/asia/gcc-states-latest.osm.pbf

  • Clone Repo

git clone https://github.com/zubair1024/dockerized-nominatim.git

  • Build the docker image