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 / MNGSoundManager.swift
Created February 12, 2016 17:45
A Swift class to manage initialization, playback and memory related to sound playback on iOS
//
// MNGSoundManager.swift
//
//
// Created by Tommie N. Carter, Jr., MBA on 10/26/15.
// Copyright © 2015 MING Technology. All rights reserved.
//
import Foundation
import AudioToolbox
@mingsai
mingsai / autogenbuild
Created October 22, 2013 18:57
Below is a simple bash script that uses the PlistBuddy executable on MacOSX to generate an auto increment versioning script. To use: Open Xcode 5 Select Project > Build Phases Click Menu: Editor > Add Build Phase > Add Run Script Build Phase Click into White Text Box Below Run Script and Paste Contents of Gist
#!/bin/bash
# Auto Increment Version Script
buildPlist=$INFOPLIST_FILE
echo $buildPlist
CFSVString=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$buildPlist")
CFBundleVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$buildPlist")
BUILD_NR=${CFBundleVersion##*.}
BUILD_NR=$(($BUILD_NR + 1))
#echo $BUILD_NR
CFBundleVersion=$CFSVString".0."$BUILD_NR
@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 / flutter_widget_arguments.md
Created September 2, 2021 09:43
How to pass arguments between widgets in Flutter

How to pass arguments to a widget using a variable:

tldr; We have to turn our thinking on its head a bit. Data can be passed to the called widget when you navigate to it by using final arguments with default values in the destination widget. Using an optional function you can get data back from the 'child' (destination) widget.

@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