This gist contains the source code in my video series about Realtime Database triggers. You can watch the three parts here:
index.ts contains the Cloud Functions code, and dialog.ts contains the script to run
| ####### Apache Installation | |
| sudo apachectl stop | |
| sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null | |
| brew install httpd | |
| #Now we just need to configure things so that our new Apache server is auto-started | |
| sudo brew services start httpd | |
| #You can see Apache running on the browser by default http://localhost:8080 |
| // ** MUI Imports | |
| import Card from '@mui/material/Card' | |
| import Grid from '@mui/material/Grid' | |
| import Typography from '@mui/material/Typography' | |
| import CardHeader from '@mui/material/CardHeader' | |
| import CardContent from '@mui/material/CardContent' | |
| import TextField from '@mui/material/TextField' | |
| import Select from '@mui/material/Select' | |
| import MenuItem from '@mui/material/MenuItem' | |
| import InputLabel from '@mui/material/InputLabel' |
| <html> | |
| <header> | |
| <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> | |
| <script> | |
| // VARIABLES, PLEASE CHANGE | |
| var APP_TOKEN = "AhCGJ-BEC3z.g8Q"; | |
| var CLIENT_TOKEN = "C25iT7U7E1xlzSk"; | |
| var GOTIFY_SERVER = "localhost:80"; | |
| // SEND INFO TO MSG SERVER |
| const XLSX = require('xlsx');const data = [ | |
| { name: 'Diary', code: 'diary_code', author: 'Pagorn' }, | |
| { name: 'Note', code: 'note_code', author: 'Pagorn' }, | |
| { name: 'Medium', code: 'medium_code', author: 'Pagorn' }, | |
| ]const workSheet = XLSX.utils.json_to_sheet(data); | |
| const workBook = XLSX.utils.book_new();XLSX.utils.book_append_sheet(workBook, workSheet, "Sheet 1"); | |
| XLSX.writeFile(workBook, "./temp/sample.xlsx"); |
| https://modularfirebase.web.app/common-use-cases/firestore/#crud-operations |
| /** | |
| * load_json_to_firstore.js | |
| * | |
| * This code is a "node script" used to load data into your Firestore database, either in "the cloud" or the emulator. | |
| * | |
| * The script is a "client app", so it logs in with Firebase Auth using email/password from the variable USER1. | |
| * | |
| * The USER1 user ([email protected]) must exist in your Firebase project and have write access | |
| * to the collection(s) you are populating. You can create that account via Firebase Console >> Authentication. | |
| * |
| // Fetch all places action to test in actions/index.js | |
| import axios from 'axios'; | |
| export function fetchPlaces() { | |
| return dispatch => { | |
| return axios.get('/api/places/fetchAll') | |
| .then(resp => { | |
| dispatch(updatePlaces(resp.data)); | |
| }) | |
| .catch(err => { |
| sudo tail -F /var/log/apache2/error.log | |
| DRUPAL MYSQL GROUP BY ERORR | |
| 'init_commands' => ['sql_mode' => "SET sql_mode = 'REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO’"] |
This gist contains the source code in my video series about Realtime Database triggers. You can watch the three parts here:
index.ts contains the Cloud Functions code, and dialog.ts contains the script to run