Skip to content

Instantly share code, notes, and snippets.

View TimonVS's full-sized avatar

Timon van Spronsen TimonVS

View GitHub Profile
liked = false
heart.on Events.Click, ->
liked = !liked
if liked
heart.animate
properties:
scale: 0.75
time: 0.1
liked = false
heart.on Events.Click, ->
liked = !liked
if liked
# Animatie om het hart te vergroten
heart.animate
properties:
scale: 0.75
liked = false
heart.on Events.Click, ->
heart.animate
time: 0.1
properties:
scale: if liked then 0.4 else 0.75
Utils.delay 0.1, -> heart.animate
time: 0.5
heart.on Events.Click, ->
puff()
if not liked
blink()
spray()
liked = not liked
blink = ->
ring = new Layer
width: 160
height: 160
borderRadius: "50%"
borderColor: "#f1c40f"
borderWidth: 10
backgroundColor: "transparent"
scale: 0
spray = ->
for i in [0..10]
dot = new Layer
width: 10
height: 10
borderRadius: "50%"
backgroundColor: Color.random()
dot.center()
dot.placeBehind heart
@TimonVS
TimonVS / test.json
Last active February 10, 2016 14:09
{
"likes_count":0,
"description_length":4,
"id":"56bb41cfc46988297e8b4568",
"description":"test dqwdqwwd",
"created_date":"2016-02-10T14:57:35+0100",
"last_modified_date":"2016-02-10T14:57:35+0100",
"post_date":"2016-02-10T14:57:35+0100",
"publish_date":"2016-02-10T14:57:35+0100",
"privacy_level":"organization",
{
"likes_count":0,
"description_length":11,
"id":"56bc4618c46988ed038b4567",
"description":"<p>testhhjhhj</p>",
"created_date":"2016-02-11T09:28:08+0100",
"last_modified_date":"2016-02-11T09:28:08+0100",
"post_date":"2016-02-11T09:28:08+0100",
"publish_date":"2016-02-11T09:28:08+0100",
"privacy_level":"organization",

Uploadcare

Uploadcare provides the ability for users to upload files from any cloud storage provider. Uploadcare also provides other functionality such as cropping images.

Implementation in the back-end

For now we will use the storage of Uploadcare, this will probably change in the future. To protect the files we will use a custom CDN with signed URLs, you can read more about this in their knowledge base.

In the future we might want to use our own storage to store the attachments the user uploads with Uploadcare. Uploadcare would provide us with a temporary link (valid for 24 hours) to the file.

[
{
"id": "56c5ce42c469882b688b4567",
"user": {
"privacy_level": "organization",
"is_invitation_pending": false,
"id": "569cd667c469883d3c8b4568",
"notification_identities": [],
"name": "Chan",
"biography": "sdfsdffvxc",