- Create a Dart scratch file (Cmd+Shift+N)
- Paste in the body of any snippet into the scratch file
- Remove the double quotes and extra commas (Cmd+R is the replace command)
- Replace the token placeholders with variable names (${1} =>
$placeholderName$ ) - Highlight the transformed code, and go to Tools > Save as Live Template
- Add the abbreviation and description as seen in the dialog box below
- Make sure to add a default value to each variable used (see the edit variables button on live template dialog below)
- Once saved you can use the stkv template anywhere in the Flutter/Dart scope
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
<?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 |
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
<?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 |
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
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, |
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
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 |
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 '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'; |
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 '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')); |
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
# Remove all gems from system | |
sudo rm -rf /Library/Ruby/Gems/* | |
#Gem environment | |
gem env |
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 * 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), |
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
$ brew install markdown htmldoc | |
$ markdown <file.md> | htmldoc --cont --headfootsize 8.0 --linkcolor blue --linkstyle plain --format pdf14 - > <file.pdf> |
NewerOlder