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
let pubAPI; //je nastavene v momente ked sa logne po FB, je to nastavene zasadne pred tym ako je vyvolane changeTitle() | |
let dbDays; //je nastavene pred changeTitle, precita hodnotu z DB.. | |
function changeTitle() { | |
if(pubAPI) { | |
let date1 = new Date(); | |
var date2 = new Date("2018-06-29 00:00:00"); | |
var timeDiff = Math.abs(date2.getTime() - date1.getTime()); |
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 TABLE phonebook ( | |
phone VARCHAR(20) NOT NULL, | |
fname VARCHAR(50) NOT NULL, | |
lname VARCHAR(50) NOT NULL, | |
email VARCHAR(100), | |
state VARCHAR(50) NOT NULL, | |
city VARCHAR(50), | |
age INT | |
); |
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
x-swagger-router-controller: products_ctrl | |
get: | |
tags: | |
- Catalog | |
summary: Get products object | |
description: You can filter list by currency, category and language | |
operationId: searchProducts | |
parameters: | |
- name: lang_id | |
in: query |
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
// v1.0.1 | |
// consts | |
const weekInMs = 1000 * 60 * 60 * 24 * 7; | |
const dayInMs = 1000 * 60 * 60 * 24; | |
// main function | |
const getWeekArray = (currentDate: Date, page: number) => { | |
if (page > 0) { | |
currentDate = new Date(currentDate.getTime() + weekInMs * page); // Add X weeks where X is page |
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
// This snippets expect that your functions use JSON as both input and output | |
// Connect to appwrite, should be globaly shared | |
let sdk = new Appwrite(); | |
sdk | |
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint | |
.setProject("5df5acd0d48c2"); // Your project ID | |
// Shared type for strict type definition |
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
Offset pagination (ms) | ||
---|---|---|
0% offset | 3.73 | |
10% offset | 52.39 | |
20% offset | 96.83 | |
30% offset | 144.13 | |
40% offset | 216.06 | |
50% offset | 257.71 | |
60% offset | 313.06 | |
70% offset | 371.03 | |
80% offset | 424.63 |
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
Offset pagination (ms) | Cursor pagination (ms) | ||
---|---|---|---|
0% offset | 3.73 | 6.27 | |
10% offset | 52.39 | 4.07 | |
20% offset | 96.83 | 5.15 | |
30% offset | 144.13 | 5.29 | |
40% offset | 216.06 | 6.65 | |
50% offset | 257.71 | 7.26 | |
60% offset | 313.06 | 4.61 | |
70% offset | 371.03 | 6.00 | |
80% offset | 424.63 | 5.60 |
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
export type AppwriteCategory = { | |
title: string; | |
queries: string[]; | |
orderAttributes: string[]; | |
orderTypes: string[]; | |
collectionName?: string; | |
} | |
export const AppwriteMovieCategories: AppwriteCategory[] = [ | |
{ |
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 to stop Appwrite before this backup, | |
# and make sure you have enough space on the machine. | |
# After backing up, make sure there is a file in 'backups/backup-___.tar.gz'. | |
# Also please check size of this file, it should be at least 5kb, even for small instances. | |
docker run --rm \ | |
-v appwrite_appwrite-mariadb:/backup/appwrite-mariadb \ | |
-v appwrite_appwrite-redis:/backup/appwrite-redis \ | |
-v appwrite_appwrite-cache:/backup/appwrite-cache \ |
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
version: '3' | |
services: | |
traefik: | |
image: traefik:2.5 | |
container_name: appwrite-traefik | |
command: | |
- --providers.file.directory=/storage/config | |
- --providers.file.watch=true | |
- --providers.docker=true | |
- --providers.docker.exposedByDefault=false |
OlderNewer