Skip to content

Instantly share code, notes, and snippets.

View ayhansipahi's full-sized avatar
👾
Coding...

Ayhan Sipahi ayhansipahi

👾
Coding...
View GitHub Profile
@ayhansipahi
ayhansipahi / system-design.md
Last active September 5, 2023 00:40
system design

1. High-Level Design

Key Components

The key components of the system are:

  1. Frontend: The web and mobile applications that users interact with to select and navigate routes.
  2. Backend API: The API that provides the predefined routes to the frontend and stores completed routes for users.
  3. User service: The service that handles user operations. Such as following and viewing other users and modifying user profiles
  4. Route service: The service that handles route operations. Such as creating, updating, and deleting routes.
  5. Real-time location tracking service: The service that tracks the position of other users navigating the same route in real-time.
@ayhansipahi
ayhansipahi / request.js
Created May 11, 2023 07:05
request for change nested content item
const axios = require('axios');
let data = JSON.stringify({
"elements": [
{
"element": {
"id": "db371bc4-d262-4092-af7b-e648ed7360e5"
},
"value": "<object type=\"application/kenticocloud\" data-type=\"component\" data-id=\"d0f32eb2-44d9-4afc-a048-f1fd71c7c9d5\"></object>\n<object type=\"application/kenticocloud\" data-type=\"component\" data-id=\"14639ad7-107a-4ae8-b644-cf8ca5178bc7\"></object>\n<object type=\"application/kenticocloud\" data-type=\"component\" data-id=\"856b1cf4-95a8-474d-ab36-bd362cb19844\"></object>\n<object type=\"application/kenticocloud\" data-type=\"component\" data-id=\"24db9d35-492f-4304-bdd2-649c316de7b9\"></object>\n<object type=\"application/kenticocloud\" data-type=\"component\" data-id=\"1f09c194-ebb1-4664-9533-22558df29dc1\"></object>\n<object type=\"application/kenticocloud\" data-type=\"component\" data-id=\"ff17ee8d-fb5f-4dbb-b6a2-83406aa3d7dd\"></object>\n<object type=\"application/kenticocloud\" data-type=\"component\" data-id=\"347e0158-38da
@ayhansipahi
ayhansipahi / kms
Created July 25, 2017 07:02 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
Online kms host address:
--------
kms.digiboy.ir
54.223.212.31
kms.cnlic.com
kms.chinancce.com
kms.ddns.net
franklv.ddns.net
k.zpale.com
m.zpale.com
function solution(X, A) {
// write your code in JavaScript (Node.js 4.0.0)
var l = A.length;
for(var n = 1; n<l-1;n++){
sol = A.slice(n),
sag = A.slice(0,n);
var x = sol.reduce(function(a,b){if(b==X){a++} return a},0);
var y = sol.reduce(function(a,b){if(b!=X){a++}return a},0);
if(x==y){return n-1};
@ayhansipahi
ayhansipahi / sublime_text_3_license_key
Created October 8, 2015 12:56 — forked from tungpt247/sublime_text_3_license_key
Sublime Text 3 License Key (Build 3065)
—– BEGIN LICENSE —–
K-20
Single User License
EA7E-940129
3A099EC1C0B5C7C5 33EBF0CF BE82FE3B
@ayhansipahi
ayhansipahi / Sublime Text License Key.md
Created October 8, 2015 12:51
Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version.

Sublime Text 2 & 3 License Key, Sublime Text Full Version

Sublime Text License Key

How to activate license key

  1. Go to menu Help > Enter License.
  2. Copy the license key below and paste it into the textbox > Click the Use License button.
  3. Enjoy! 👍
@ayhansipahi
ayhansipahi / bookmarks.md
Created September 27, 2015 09:54
bookmarks
@ayhansipahi
ayhansipahi / Mars Rovers
Last active August 29, 2015 14:20
Solution for Mars Rovers
function MarsRover(x, y) {
max_x = x;
max_y = y;
rovers = [];
var _checkLanding = function() {
r = rovers[0];
if (r && (r.x > max_x || r.x < 0 || r.y > max_y || r.y < 0)) {
console.log("Rover couldn't land.");
rovers.shift();
return false;
<!DOCTYPE html>
<html>
<body>
<canvas id="myCanvas" width="400" height="400" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<script>
@ayhansipahi
ayhansipahi / designer.html
Last active August 29, 2015 14:17
designer
<link rel="import" href="../core-ajax/core-ajax.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">