We will be using following information throughout this article:
index_name : customers
index_type : personal
customer will have name,age,gender,email,phone,address,city,state as fields in schema for now
import 'dart:convert'; | |
class Restaurant { | |
Restaurant({ | |
required this.name, | |
required this.cuisine, | |
this.yearOpened, | |
required this.reviews, | |
}); | |
final String name; |
File | Purpose |
---|---|
/etc/compose/docker-compose.yml |
Compose file describing what to deploy |
/etc/systemd/system/docker-compose-reload.service |
Executing unit to trigger reload on docker-compose.service |
/etc/systemd/system/docker-compose-reload.timer |
Timer unit to plan the reloads |
/etc/systemd/system/docker-compose.service |
Service unit to start and manage docker compose |
import 'package:flutter/material.dart'; | |
import 'package:get/get.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyNavModel { | |
static final Map<String, MyNavModel> urls = {}; | |
final IconData icon; |
# https://www.zeolearn.com/magazine/setting-caching-headers-for-a-spa-in-nginx-cache | |
server { | |
listen 80; | |
server_name localhost; | |
root /usr/share/nginx/html; | |
# X-Frame-Options is to prevent from clickJacking attack | |
add_header X-Frame-Options SAMEORIGIN; | |
import 'package:flutter/material.dart'; | |
import 'package:get/get.dart'; | |
void main() { | |
runApp(GetMaterialApp( | |
initialRoute: '/home', | |
getPages: [ | |
GetPage( | |
name: '/home', | |
page: () => HomePage(), |
import 'package:flutter/material.dart'; | |
import 'package:get/get.dart'; | |
void main() { | |
runApp(GetMaterialApp( | |
navigatorKey: Get.key, | |
initialRoute: '/home', | |
getPages: [ | |
GetPage( | |
name: '/home', |
/// roipeker - 2020 | |
/// Based on | |
/// https://medium.com/coding-with-flutter/flutter-case-study-multiple-navigators-with-bottomnavigationbar-90eb6caa6dbf | |
import 'package:flutter/material.dart'; | |
import 'package:get/get.dart'; | |
class SampleMultiNavColors extends StatelessWidget { | |
@override |
/* | |
* Author: Jorge Wander Santana Urena | |
* Goal: Screen with page view & bottom pagination to change current page | |
**/ | |
// Import material package to use UI | |
import 'package:flutter/material.dart'; | |
main() => runApp(MyApp()); |
DBNAME=<database_name> | |
TABLE=<table_name> | |
FNAME=/path/to/output/dir/$(date +%Y.%m.%d)-$DBNAME.csv | |
#(1)creates empty file and sets up column names using the information_schema | |
mysql -u <username> -p<password> $DBNAME -B -e "SELECT COLUMN_NAME FROM information_schema.COLUMNS C WHERE table_name = '$TABLE';" | awk '{print $1}' | grep -iv ^COLUMN_NAME$ | sed 's/^/"/g;s/$/"/g' | tr '\n' ',' > $FNAME | |
#(2)appends newline to mark beginning of data vs. column titles | |
echo "" >> $FNAME |