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
dependencies: | |
cloud_firestore: ^0.14.0+2 | |
firebase_storage: ^4.0.0 |
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
openssl genrsa 2048 > filessl.key | |
chmod 400 filessl.key | |
openssl req -new -x509 -nodes -sha256 -days 365 -key filessl.key -out filessl.crt | |
openssl pkcs12 -export -out filessl.pfx -inkey filessl.key -in filessl.crt |
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
#include <FS.h> // this needs to be first, or it all crashes and burns... | |
#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager | |
#include <ArduinoJson.h> // https://github.com/bblanchon/ArduinoJson | |
#ifdef ESP32 | |
#include <SPIFFS.h> | |
#endif | |
//define your default values here, if there are different values in config.json, they are overwritten. | |
char mqtt_server[40]; |
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
# Uncomment this line to define a global platform for your project | |
platform :ios, '11.0' | |
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. | |
ENV['COCOAPODS_DISABLE_STATS'] = 'true' | |
project 'Runner', { | |
'Debug' => :debug, | |
'Profile' => :release, | |
'Release' => :release, |
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
target 'Runner' do | |
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.5.0' | |
.... |
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
[ | |
{ | |
"id": "2", | |
"station_favorite": false, | |
"name": "สยามพารากอน", | |
"address": "ปทุมวัน, ปทุมวัน, กรุงเทพมหานคร", | |
"description": "GA [North] B18-B19,C18-C19", | |
"latitude": 13.745764, | |
"longitude": 100.53473, | |
"status": "ปิดบริการ", |
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
Flutter 3.3 live session note | |
* Stable release for all platforms | |
* SelectAbleArea widget | |
* Trackpad input | |
* MD3 | |
* IconButton |
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
import 'package:flutter/material.dart'; | |
import 'package:get/get.dart'; | |
import '../controllers/home_controller.dart'; | |
class HomeView extends GetView<HomeController> { | |
const HomeView({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { |
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
// show chat screen | |
import 'dart:developer'; | |
import 'package:chat/consts.dart'; | |
import 'package:cloud_firestore/cloud_firestore.dart'; | |
import 'package:flutter/material.dart'; | |
class ChatPage extends StatelessWidget { | |
ChatPage({Key? key, required this.roomId}) : super(key: key); |
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
#!/usr/bin/python | |
import RPi.GPIO as GPIO | |
import time | |
# blinking function | |
def blink(pin): | |
GPIO.output(pin,GPIO.HIGH) | |
time.sleep(1) | |
GPIO.output(pin,GPIO.LOW) | |
time.sleep(1) |