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
// Original post discovery (in progress) | |
var noteForms = document.querySelectorAll('.note-post-form'); | |
if (noteForms.length > 0) { | |
for (var i = 0;i < noteForms.length;i++) { | |
var form = noteForms[i]; | |
var inReplyToField = form.querySelector('.in-reply-to'); | |
bean.on(inReplyToField, 'blur', function(event) { | |
var url = event.target.value; | |
// TODO: Start loading indicator | |
promise.get('/services/original-post', {'url': url}).then(function (error, text, xhr) { |
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
{ | |
"rels": { | |
"shortcut": [ | |
"https:\/\/abs.twimg.com\/favicons\/favicon.ico" | |
], | |
"icon": [ | |
"https:\/\/abs.twimg.com\/favicons\/favicon.ico" | |
], | |
"canonical": [ | |
"https:\/\/twitter.com\/BarnabyWalters" |
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
<?php | |
function renderTemplate($template, array $__templateData = array()) { | |
$render = function ($__path, $render=null) use ($__templateData) { | |
ob_start(); | |
extract($__templateData); | |
unset($__templateData); | |
include __DIR__ . '/../templates/' . $__path . '.php'; | |
return ob_get_clean(); | |
}; | |
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
<?php | |
namespace Taproot; | |
use SplQueue; | |
class FifoQueue extends SplQueue { | |
protected $capacity; | |
public function __construct($capacity) { $this->capacity = $capacity; } |
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
<?php | |
// where $app is a silex/pimple container — this could easily be rewritten as an ordinary function though | |
// example usage: list($location, $err) = $app['nominatim.reverse']([-1.125, 3.526]) | |
function nameForLocation(array $location, $fallback='Unknown Location') { | |
if (isset($location['name'])) return $location['name']; | |
if (isset($location['street-address']) and isset($location['region'])) | |
return "{$location['street-address']}, {$location['region']}"; |
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
# coding: utf-8 | |
import argparse | |
import pandas as pd | |
""" | |
Find which species in an iNaturalist export only have observations from a single observer. | |
Get an export from here: https://www.inaturalist.org/observations/export with a query such | |
as quality_grade=research&identifications=any&rank=species&projects[]=92926 and at least the |
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
<div class="h-entry"> | |
<h1 class="p-name">Album Name</h1> | |
<time class="dt-published">2021-02-12</time> | |
<img class="u-photo" src="cover.png" alt="" /> | |
<p class="p-summary">Summary of what the ablum is</p> | |
<div class="e-content"> |
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
file: 2021-06-timberlake.csv | |
# context_query is used to provide context for links to lists of observations when there’s no inat project providing that context. | |
# If you do have a project with date and place bounds, leave out context_query and use | |
# project: your-project-id | |
# instead. | |
context_query: 'd1=2021-06-11&d2=2021-06-13&place_id=118103' | |
locale: en | |
root_header_level: 2 | |
places: | |
# Places MUST be in smallest to biggest order, id: global MUST be last in list. |
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
.DS_Store | |
composer.phar | |
/vendor/ |