Skip to content

Instantly share code, notes, and snippets.

View daveaiello's full-sized avatar

Dave Aiello daveaiello

View GitHub Profile
@daveaiello
daveaiello / githubFollow.html
Last active April 13, 2017 16:21 — forked from xonecas/githubFollow.html
Github follow me icon/badge/button
<!-- Just replace **USERNAME** by your github username :-) -->
<style>
#followGithub {
color: #121516;
text-shadow: 0 1px 1px #ccc;
padding: 1.2em 0.4em;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
@daveaiello
daveaiello / add-contact.py
Last active April 13, 2017 16:22
Grab business-related iOS contact info from the clipboard and creating a new contact (run on Pythonista)
import contacts
import clipboard
name = clipboard.get().split('|')
pers = contacts.Person()
pers.organization = bytes(name[0], encoding='UTF-8')
pers.address = [(contacts.WORK,
{contacts.STREET: name[1],
contacts.CITY: name[2],
contacts.STATE: name[3],
@daveaiello
daveaiello / image-entry-asset-display.mtml
Created January 14, 2014 15:53
Count and display multiple Entry Assets of the type image (photo) associated with the current entry. This is Movable Type Markup Language code to be that leverages the Movable Type Asset Manager. I created this so that Movable Type developers can see parallel constructs in MTML for a native asset type to those I created for Flickr, YouTube, and …
<mt:var name="image_asset_count" value="0">
<mt:EntryAssets type="image">
<mt:var name="image_asset_count" op="++" setvar="image_asset_count">
</mt:EntryAssets>
<mt:Ignore>
<!-- Later in the template... -->
</mt:Ignore>
<mt:Unless name="image_asset_count" eq="0">
@daveaiello
daveaiello / soundcloud-entry-assets.mtml
Created January 14, 2014 15:48
Count and display multiple Entry Assets of the type SoundCloud audio track associated with the current entry. This is Movable Type Markup Language code to be used in conjunction with the SuperAssets For SoundCloud plugin, which extends the Movable Type Asset Manager.
<mt:var name="soundcloud_asset_count" value="0">
<mt:EntryAssets type="soundcloud_track">
<mt:var name="soundcloud_asset_count" op="++" setvar="soundcloud_asset_count">
</mt:EntryAssets>
<mt:Ignore>
<!-- Later in the template... -->
</mt:Ignore>
<mt:Unless name="soundcloud_asset_count" eq="0">
@daveaiello
daveaiello / youtube-entry-asset-display.mtml
Last active January 3, 2016 06:08
Count and display multiple Entry Assets of the type YouTube video associated with the current entry. This is Movable Type Markup Language code to be used in conjunction with the SuperAssets For YouTube plugin, which extends the Movable Type Asset Manager.
<mt:var name="youtube_asset_count" value="0">
<mt:EntryAssets type="youtube_video">
<mt:var name="youtube_asset_count" op="++" setvar="youtube_asset_count">
</mt:EntryAssets>
<mt:Ignore>
<!-- Later in the template... -->
</mt:Ignore>
<mt:Unless name="youtube_asset_count" eq="0">
@daveaiello
daveaiello / flickr-entry-asset-display.mtml
Last active January 3, 2016 05:59
Count and display multiple Entry Assets of the type Flickr photo associated with the current entry. This is Movable Type Markup Language code to be used in conjunction with the SuperAssets For Flickr plugin, which extends the Movable Type Asset Manager.
<mt:var name="flickr_asset_count" value="0">
<mt:EntryAssets type="flickr_photo">
<mt:var name="flickr_asset_count" op="++" setvar="flickr_asset_count">
</mt:EntryAssets>
<mt:Ignore>
<!-- Later in the template... -->
</mt:Ignore>
<mt:Unless name="flickr_asset_count" eq="0">
@daveaiello
daveaiello / SearchSiteFor.js
Last active April 13, 2017 16:24
This is a JavaScript you can drop into your Bookmarks Bar and click on to search the current website via Google. I can't remember where I got it from originally.
javascript:Qr=prompt('Search%20Site%20for','');if(Qr)location.href='http://www.google.com/search?&q=site:'+encodeURIComponent(window.location.hostname)+'+'+escape(Qr)