Skip to content

Instantly share code, notes, and snippets.

View lukevella's full-sized avatar

Luke Vella lukevella

View GitHub Profile
0x3F3882Db429A72199f06E442387D008E5111D297
func rotate(degress: Double) {
UIView.animate(
withDuration: 0.1,
delay: 0,
options: [.beginFromCurrentState, .curveEaseOut, .allowUserInteraction],
animations: {
self.transform = CGAffineTransform(rotationAngle: CGFloat(degrees.toRadians()))
},
completion: nil
)
@lukevella
lukevella / email.html
Created April 14, 2016 11:49
Rallly SendGrid Email Template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" data-dnd="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
<!--[if !mso]><!-->
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<!--<![endif]-->
<!--[if (gte mso 9)|(IE)]><style type="text/css">
@lukevella
lukevella / elapsed.filter.js
Last active August 15, 2023 02:34
Elapsed Time AngularJS Filter
// {{ dateString | elapsed }}
angular.module('elapsedFilter', [])
.filter('elapsed', function(){
return function(date){
if (!date) return;
var time = Date.parse(date),
timeNow = new Date().getTime(),
difference = timeNow - time,
seconds = Math.floor(difference / 1000),