Skip to content

Instantly share code, notes, and snippets.

@tonyedwardspz
tonyedwardspz / README.md
Last active December 22, 2015 00:28 — forked from camillebaldock/README.md
Dashing Trello widget

Description

A Dashing widget for displaying the number of items of lists on a Trello board.

screen shot

See a live demo here.

Usage

@tonyedwardspz
tonyedwardspz / FlipAhead.php
Created November 23, 2015 05:02
Flip Ahead browsing
<?php
$single = (is_single() ? TRUE : FALSE);
if ($single){
$prevPost = get_previous_post();
if (!empty( $prevPost )){ ?>
<link rel="prev" href="<?php echo get_permalink($prevPost->ID); ?>"/>
<?php }
$nextPost = get_next_post();
if (!empty( $nextPost )) { ?>
<link rel="next" href="<?php echo get_permalink($nextPost->ID); ?>"/>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
@tonyedwardspz
tonyedwardspz / daily-dilbert.html
Created September 26, 2015 09:16
A intermediate step from the daily Dilbert polymer element tutorial
<link rel="import" href="../polymer/polymer.html">
<!--
An element for displaying the Deilbert Cartoon of the day.
Example:
<daily-dilbert></daily-dilbert>
@group Seed Elements
@tonyedwardspz
tonyedwardspz / javascriptDateFormatting.html
Created September 15, 2015 21:47
A way method to format a date in javascript
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<p id="format"></p>
<script>
var date = new Date("2015-03-25T12:00:00");
@tonyedwardspz
tonyedwardspz / Readme.md
Last active September 9, 2015 13:44 — forked from mordonez/Readme.md
Trello Job for Dashing
@tonyedwardspz
tonyedwardspz / dates.swift
Created August 4, 2015 10:16
Swift Dates plyground
var date = NSDate()
var yesterday = date.dateByAddingTimeInterval(-24 * 60 * 60)
var dateComparisonResult: NSComparisonResult = date.compare(yesterday)
if dateComparisonResult == NSComparisonResult.OrderedAscending {
println("date is smaller than yesterday")
} else if dateComparisonResult == NSComparisonResult.OrderedDescending {
println("date is larger than yesterday")
} else {
[
{
"_id": "1",
"name": "10 Downing Street",
"latitude": 51.5033630,
"longitude": -0.1276250
},
{
"_id": "2",
"name": "Houses of Paliment",
@tonyedwardspz
tonyedwardspz / gist:c90a34627c7d536f7f3f
Last active August 29, 2015 14:22
Metadata tutorial from plymouthsoftware.com
func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject]){
imagePicker.dismissViewControllerAnimated(true, completion: nil)
var selectedImage = info[UIImagePickerControllerOriginalImage] as! UIImage
var metadata: NSDictionary
var library:ALAssetsLibrary? = ALAssetsLibrary()
// Get the images meta data
if(picker.sourceType == .Camera) {
metadata = info[UIImagePickerControllerMediaMetadata] as! NSDictionary