Skip to content

Instantly share code, notes, and snippets.

const functions = require("firebase-functions");
const axios = require("axios");
exports.sendWelcomeMessage = functions.firestore
.document("users/{userId}")
.onCreate(async (user, context) => {
const userData = user.data();
await sendGistMessage("welcome", "bottom", context.params.userId, userData);
});
@BernardGatt
BernardGatt / news-list.json
Last active July 16, 2019 18:17
News list example
{
"type": "listWidget",
"dataSource": "$news.articles",
"template": {
"type": "actionWidget",
"behavior": "system",
"action": "$news.articles.url",
"component": {
"type": "fixedListWidget",
"components": [{
@BernardGatt
BernardGatt / output.json
Created July 13, 2019 14:23
News List Item Output
{
"id": "4092d342-352d-4b66-9378-144035e8867f",
"type": "blockWidget",
"padding": ["","","","l"],
"component": {
"id": "4650c074-5d89-44ef-90bf-294da7865819",
"type": "actionWidget",
"onEvent": "tap",
"action": "https://metro.co.uk...",
"behaviour": "system",
{
"name": "news",
"query": "getNewsByTopic",
"version": 1
}
"components": [
{
"type": "textWidget",
"textAlign": "center",
"color": "mainText",
"text": "Hello World",
"style": "headingL"
}
]
{
"version": 1,
"engineVersion": 1,
"name": "getTopics",
"method": "GET",
"endpoint": "http://api.bourbon.sh/news/{userId}/topics",
"requestHeaders": {
"Authorization": "Bearer {jwtToken}"
},
"requestBody": {},
alias purgeall='sudo rm -rf ~/Library/Caches/org.carthage.CarthageKit && sudo rm -rf ~/Library/Developer/Xcode/DerivedData/*'
alias purgeallbuilds='rm -rf ~/Library/Developer/Xcode/DerivedData/*'
alias gitsubdevelop='git submodule foreach "(git checkout develop; git pull)&"'
alias cuios='carthage update --platform ios --no-build-binaries'
function gi() { curl -L -s https://www.gitignore.io/api/$@ ;}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EMSampleBL.Process
{
public class Employee
{
public List<EMSampleDL.vEmployeeDepartment> GetAllEmployeeDepartments()