Skip to content

Instantly share code, notes, and snippets.

View joserocha3's full-sized avatar
🏠
Working from home

Pablo Rocha joserocha3

🏠
Working from home
View GitHub Profile
@joserocha3
joserocha3 / .gitignore
Created September 12, 2016 05:28
Unity project .gitignore
# Created by https://www.gitignore.io/api/unity
### Unity ###
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*
@joserocha3
joserocha3 / rules.json
Created September 28, 2016 14:42
rules.json
[
{
"title": "Double Shot",
"desc": "Roll some dice, Highest number takes a shot",
"img": "imgs/obj_A.jpg"
},
{
"title": "Straight Shooter",
"desc": "Take a shot straight, as in no chaser",
@joserocha3
joserocha3 / _setup.md
Last active June 20, 2019 03:23
Flutter Talk (Easy)

$ flutter create flutter_talk

$ cd flutter_talk

Now open emulator or attach device

$ flutter run

@joserocha3
joserocha3 / 00.setup.md
Last active June 20, 2019 19:31
Flutter Talk (Not so easy)

$ flutter create flutter_talk

$ cd flutter_talk

Now open emulator or attach device

$ flutter run

@joserocha3
joserocha3 / map-snapshot.js
Created February 2, 2018 16:14
Use map instead of forEach with a firestore snapshot
exports.recurringPayment = functions.https.onRequest(async (req, res) => {
const hook = req.body.type
const data = req.body.data.object
// 300 or 400 as failed will cause stripe to rerun
if (!data) return res.status(400).send('data missing')
if (!data.subscription) return res.status(200).send('not a subscription')
if (hook !== 'invoice.payment_succeeded' && hook !== 'invoice.payment_failed') return res.status(400).send('unknown hook')