Skip to content

Instantly share code, notes, and snippets.

View mingsai's full-sized avatar
🎯
Focusing

Tommie N. Carter, Jr. mingsai

🎯
Focusing
View GitHub Profile
@mingsai
mingsai / leads_detailviewdefs.php
Created December 17, 2023 19:54
Leads.Metadata.DetailViewDefs.PHP
<?php
/**
*
* SugarCRM Community Edition is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
*
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
*
* This program is free software; you can redistribute it and/or modify it under
@mingsai
mingsai / prospects_detailviewdefs.php
Created December 17, 2023 19:51
Prospects.Metadata.DetailViewDefs.PHP
<?php
/**
*
* SugarCRM Community Edition is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
*
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
*
* This program is free software; you can redistribute it and/or modify it under
@mingsai
mingsai / Wonder-woman-theme-lyrics.txt
Created April 13, 2022 04:32
Wonder Woman lyrics
Wonder Woman, Wonder Woman.
All the world's waiting for you,
and the power you possess.
In your satin tights,
Fighting for your rights
And the old Red, White and Blue.
Wonder Woman, Wonder Woman.
Now the world is ready for you,
@mingsai
mingsai / more-pubspec.yaml
Last active March 24, 2022 15:29
MUST HAVE - Packages to use in dart/flutter
camera: ^0.9.4+16
cloud_firestore: ^3.1.10
cloud_functions: ^3.2.10
cupertino_icons: ^1.0.4
flash: ^2.0.3+2
flutterfire_ui: ^0.3.6+1
firebase_auth: ^3.3.11
firebase_auth_web: ^3.3.9
firebase_core: ^1.13.1
firebase_storage: ^10.2.9
@mingsai
mingsai / firebase_repo_example.dart
Created March 21, 2022 00:49
FB Repo via RxDart Sample
import 'dart:async';
import 'dart:convert';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:connectit_app/data/local/prefs/prefs_helper.dart';
import 'package:connectit_app/data/model/result.dart';
import 'package:connectit_app/data/model/user.dart';
import 'package:connectit_app/data/repo/user/google_login_repository.dart';
import 'package:connectit_app/di/injector.dart';
import 'package:connectit_app/utils/log_utils.dart';
@mingsai
mingsai / isolate-example.dart
Last active March 20, 2022 22:37
Use compute function on non-web apps as shortcut to spawn isolates
import 'dart:async';
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
Future<List<Photo>> fetchPhotos(http.Client client) async {
final response = await client
.get(Uri.parse('https://jsonplaceholder.typicode.com/photos'));
@mingsai
mingsai / terminal.sh
Created March 19, 2022 00:11
Gem Commands
# Remove all gems from system
sudo rm -rf /Library/Ruby/Gems/*
#Gem environment
gem env
@mingsai
mingsai / onUserCreated.js
Created March 15, 2022 19:58
Firebase Function to create user after phone validated
import * as admin from 'firebase-admin';
const db = admin.firestore()
export async function onUserCreated(user: any): Promise<boolean> {
if(typeof user.phoneNumber != "undefined") {
const batch = db.batch()
batch.set(db.collection("users").doc(user.uid), {
"phoneNumber": user.phoneNumber,
"creationTime": new Date(user.metadata.creationTime),
@mingsai
mingsai / vs2as_snippets.md
Created March 13, 2022 15:23
Convert VS Snippets to Android Studio/IntelliJ Live Templates

How to convert Visual Studio Code snippets for use in Android Studio

  1. Create a Dart scratch file (Cmd+Shift+N)
  2. Paste in the body of any snippet into the scratch file
  3. Remove the double quotes and extra commas (Cmd+R is the replace command)
  4. Replace the token placeholders with variable names (${1} => $placeholderName$)
  5. Highlight the transformed code, and go to Tools > Save as Live Template
  6. Add the abbreviation and description as seen in the dialog box below
  7. Make sure to add a default value to each variable used (see the edit variables button on live template dialog below)
  8. Once saved you can use the stkv template anywhere in the Flutter/Dart scope
@mingsai
mingsai / markdown-to-pdf.txt
Created March 3, 2022 14:41 — forked from davisford/markdown-to-pdf.txt
Convert Markdown to PDF
$ brew install markdown htmldoc
$ markdown <file.md> | htmldoc --cont --headfootsize 8.0 --linkcolor blue --linkstyle plain --format pdf14 - > <file.pdf>