Skip to content

Instantly share code, notes, and snippets.

View nynevi's full-sized avatar

Sercan AKMAN nynevi

  • Turkey, Antalya
View GitHub Profile
@nynevi
nynevi / detectDescriptorsInRouteInstructions.js
Last active July 22, 2020 11:33
İstanbul Anadolu-Avrupa Yakası Geçiş, İstanbul Kıta Değişimi Saptama, İstanbul Köprü Geçişi Saptama, Osmangazi Köprüsü Geçişi Saptama, Istanbul Europe-Asia Continent Change Detection, Istanbul Bridges Change, Passing Detection, Osmangazi Bridge Passing Detection | Google Maps API, Javascript
/*
Aşağıdaki detectRouteContinentChange asenkron fonksiyonu verilen kalkış ve varış enlem/boylamlarıyla
Google Maps Directions servisi (API'si) üzerinden İstanbul içinde kıta değişimi veya
Osmangazi Köprüsünden geçiş olup olmadığını saptar
Çeşitli hizmetlerde ücretlendirme yaparkan fayda sağlayacaktır
Çalışma mantığı: köprü, ücretli yollar ve otobanlardan geçirmeyecek şekilde karasal güzergahlar çizdirilir
ve bu güzergahların her bir ayağının yol tarifleri arasında regionChangeParameters array'i içindeki
saptayıcılar aracılığıyla geçiş olup olmadığı anlaşılır
@nynevi
nynevi / slimdown.js
Created May 30, 2019 18:51 — forked from renehamburger/slimdown.js
slimdown.js
'use strict';
/**
* Javascript version of https://gist.github.com/jbroadway/2836900
*
* Slimdown - A very basic regex-based Markdown parser. Supports the
* following elements (and can be extended via Slimdown::add_rule()):
*
* - Headers
* - Links
@nynevi
nynevi / default
Created July 24, 2017 19:29 — forked from miguelmota/default
Nginx + Node.js server configuration. Blog post: http://www.miguelmota.com/blog/nodejs-and-ngnix-on-ubuntu/
# The upstream module is the link between Node.js and Nginx.
# Upstream is used for proxying requests to other servers.
# All requests for / get distributed between any of the servers listed.
upstream helloworld {
# Set up multiple Node.js webservers for load balancing.
# max_fails refers to number of failed attempts
# before server is considered inactive.
# weight priorities traffic to server. Ex. weight=2 will recieve
# twice as much traffic as server with weight=1
server <your server ip>:3000 max_fails=0 fail_timeout=10s weight=1;
@nynevi
nynevi / gist:c3d720dac6cf7ff70af16dae0b79095c
Created June 15, 2017 20:26
error on npm run clean-maps
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Nynevi\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'clean-maps' ]
2 info using npm@5.0.0
3 info using node@v6.10.2
4 verbose run-script [ 'preclean-maps', 'clean-maps', 'postclean-maps' ]
5 info lifecycle knowledge-map-search-engine@1.0.0~preclean-maps: knowledge-map-search-engine@1.0.0
6 silly lifecycle knowledge-map-search-engine@1.0.0~preclean-maps: no script for preclean-maps, continuing
@nynevi
nynevi / gist:5814ce29cf6c1e46d203b01dd43a5a75
Created June 15, 2017 20:23
error on npm run update-maps
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Nynevi\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'clean-maps;',
1 verbose cli 'scrapy',
1 verbose cli 'runspider',
1 verbose cli 'spider.py',
1 verbose cli '-o',
1 verbose cli 'server/lookup.json' ]
@nynevi
nynevi / frontendDevlopmentBookmarks.md
Created February 20, 2017 14:36 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.