Skip to content

Instantly share code, notes, and snippets.

View iandexter's full-sized avatar

Ian Dexter D Marquez iandexter

View GitHub Profile
@iandexter
iandexter / flickr-interestingness-json.js
Created May 22, 2009 04:50 — forked from anonymous/flickr-interestingness-json.js
Get random photo from Flickr Interestingness
function loadJSON(url) {
var headElt = document.getElementsByTagName('head')[0];
var jsonScript = document.createElement('script');
jsonScript.type = "text/javascript";
jsonScript.src = url;
headElt.appendChild(jsonScript);
}
var flickAPIkey = "your API key goes here";
loadJSON("http://api.flickr.com/services/rest/?method=flickr.interestingness.getList&api_key=" + flickrAPIkey + "&per_page=100&page=1&format=json");
function jsonFlickrApi(obj) {
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.