Skip to content

Instantly share code, notes, and snippets.

Avatar

Dave Aiello daveaiello

View GitHub Profile
@daveaiello
daveaiello / githubFollow.html
Last active Apr 13, 2017 — forked from xonecas/githubFollow.html
Github follow me icon/badge/button
View githubFollow.html
<!-- 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 Apr 13, 2017
Grab business-related iOS contact info from the clipboard and creating a new contact (run on Pythonista)
View add-contact.py
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 Jan 14, 2014
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 …
View image-entry-asset-display.mtml
<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 Jan 14, 2014
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.
View soundcloud-entry-assets.mtml
<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 Jan 3, 2016
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.
View youtube-entry-asset-display.mtml
<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 Jan 3, 2016
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.
View flickr-entry-asset-display.mtml
<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 Apr 13, 2017
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.
View SearchSiteFor.js
javascript:Qr=prompt('Search%20Site%20for','');if(Qr)location.href='http://www.google.com/search?&q=site:'+encodeURIComponent(window.location.hostname)+'+'+escape(Qr)
You can’t perform that action at this time.