Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Gabriel Fabri gcfabri

🏠
Working from home
  • Campinas, SP - Brazil
Block or report user

Report or block gcfabri

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View botkit-storage-firebase-admin.js
/**
* Botkit Storage Firebase Admin Driver Implementation
* Follow the instructions from Firebase Documentation to setup firebase-admin (https://firebase.google.com/docs/admin/setup).
* Replace the value of serviceAccount, databaseURL and databaseAuthVariableOverride.serverKey with your data.
*
* Don't forget to set up your server key on database rules.
*/
import firebase from 'firebase-admin';
import serviceAccount from '../path.to.service.account.json';
@gcfabri
gcfabri / subscribe-unsubscribe.snippet.ts
Last active Apr 11, 2017
Captures an array of subscriptions and unsubscribe when the component is destroyed.
View subscribe-unsubscribe.snippet.ts
// ...
private subscriptions: Array<Subscription> = [];
ngOnDestroy(): void {
this.subscriptions.forEach((subscription: Subscription) => {
if (!subscription.closed) {
subscription.unsubscribe();
}
});
@gcfabri
gcfabri / gulp.config.js
Created Jun 30, 2016
Gulp + Nodemon + Express + BrowserSync
View gulp.config.js
'use strict';
module.exports = function() {
var root = './';
var temp = './.tmp/';
var server = 'src/server/';
var client = 'src/client/';
var clientApp = client + 'app/';
var images = client + 'images/';
@gcfabri
gcfabri / view.html
Created Jun 30, 2016
Filter item using ng-option in <select>
View view.html
<!-- ng-repeat="user in vm.users" ng-repeat="profile in vm.profiles -->
<select class="form-control"
ng-model="user.profile"
ng-options="profile.name for profile in vm.profiles | filter: {name: '!{{user.profile.name}}'}"
ng-value="{{user.profile.$id}}">
<option value="">{{user.profile.name}}</option>
</select>
@gcfabri
gcfabri / README.md
Last active Jul 30, 2019
Angular + Express + Nodemailer
View README.md

Application sample with Angular + Express + Nodemailer.

Obs.: // use the HTML5 History API $locationProvider.html5Mode(true);

You can’t perform that action at this time.