This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a pretty dumb script that gets pics matching some tags from social | |
# media services and writes info about them to a local CSV file. Yes, it could | |
# be much better. Right now it only downloads *recent* data, not all data, so | |
# it's designed to run frequently. Improvements could include | |
# * writing to a single file, w/ de-duping | |
# * writing to a Google Spreadsheet | |
# * retrieval of all matches for Flickr and Instagram (impossible w/ Twitter) | |
require 'rubygems' | |
require 'twitter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Windshaft = require('lib/windshaft'); | |
var _ = require('underscore'); | |
var config = { | |
base_url: '/:table', | |
base_url_notable: '/', | |
grainstore: { | |
datasource: { | |
user:'kueda', | |
host: '127.0.0.1', | |
port: 5432, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.TaxonTileController = Ember.ObjectController.extend({ | |
defaultPhotoUrl: function() { | |
var guideTaxon = this.get('content') | |
var photos = guideTaxon.get('guidePhotos') | |
var photo = photos ? photos.get('lastObject') : null | |
var url = photo ? photo.get('url') : 'http://www.inaturalist.org/images/animals.jpg' | |
if (photo) { | |
console.log("[DEBUG] photo._data.attributes: ", photo._data.attributes) // this is an empty object | |
} | |
return url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> | |
<html> | |
<head> | |
<title>map test</title> | |
<script type="text/javascript" charset="utf-8" src="javascripts/polymaps.js"></script> | |
<script type="text/javascript" charset="utf-8" src="javascripts/jquery.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(document).ready(function() { | |
window.po = org.polymaps | |
window.map = po.map() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> | |
<html> | |
<head> | |
<title>map test</title> | |
<script type="text/javascript" charset="utf-8" src="javascripts/polymaps.js"></script> | |
<script type="text/javascript" charset="utf-8" src="javascripts/jquery.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(document).ready(function() { | |
window.po = org.polymaps | |
window.map = po.map() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
d3.phylogram.js | |
Wrapper around a d3-based phylogram (tree where branch lengths are scaled) | |
Also includes a radial dendrogram visualization (branch lengths not scaled) | |
along with some helper methods for building angled-branch trees. | |
Copyright (c) 2013, Ken-ichi Ueda | |
All rights reserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ scopeName = 'text.plain'; | |
foldingStartMarker = '/\*\*|\{\s*$'; | |
foldingStopMarker = '\*\*/|^\s*\}'; | |
patterns = ( | |
{ name = 'markup.bold'; | |
match = '^\s*(\*\s.*)$\n?'; | |
}, | |
{ name = 'comment'; | |
match = '^\s*(x\s.*)$\n?'; | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function syncPhoto(photo, options) { | |
var options = options || {}; | |
var credentials = Ti.App.Properties.getString('currentUserCredentials'); | |
var observation = photo.getObservation(); | |
var f = photo.getFile(); | |
var xhr = Titanium.Network.createHTTPClient({ | |
onerror: function(e) { | |
Ti.API.info("ERROR " + e.error); | |
if (e.error.match(/timed out/)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scope = YourModel.scoped({}) | |
scope = scope.some_named_scope() | |
puts scope.full_proxied_options[:joins] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# By Henrik Nyh <http://henrik.nyh.se> 2008-01-30. | |
# Free to modify and redistribute with credit. | |
# modified by Dave Nolan <http://textgoeshere.org.uk> 2008-02-06 | |
# Ellipsis appended to text of last HTML node | |
# Ellipsis inserted after final word break | |
# modified by Mark Dickson <mark@sitesteaders.com> 2008-12-18 | |
# Option to truncate to last full word | |
# Option to include a 'more' link |