Skip to content

Instantly share code, notes, and snippets.

View fatuhoku's full-sized avatar

Hok Shun Poon fatuhoku

View GitHub Profile
@fatuhoku
fatuhoku / parse_thumbnail
Created November 17, 2015 21:51 — forked from lukejohnjones/parse_thumbnail
Parse.com thumbnail creation retaining aspect ratio
var Image = require("parse-image");
Parse.Cloud.beforeSave("_User", function(request, response) {
var user = request.object;
if (!user.get("profilePhoto")) {
response.error("Users must have a profile photo.");
return;
}
if (!user.dirty("profilePhoto")) {
@fatuhoku
fatuhoku / JHGradientView.swift
Last active November 12, 2015 23:47 — forked from jhays/JHGradientView.swift
GradientView - Editable in Interface Builder
//
// JHGradientView.swift
// Gradient View editable in Interface Builder
//
// Created by JHays on 2/20/15.
// Copyright (c) 2015 Orbosphere. All rights reserved.
//
import Foundation
import UIKit