Skip to content

Instantly share code, notes, and snippets.

@mapmeld
mapmeld / fieldpapers-bookmarklet.js
Created April 19, 2012 06:04
Red Pen: experimental auto-marker for FieldPapers.org
/*
Red Pen turns red (and blue!) dots on Field Papers tiles into markers automatically
Tested with Sharpie and PaperMate ballpoint pens
Write a description to save the marker
I don't understand the server-side installation or the QR-scanning, so I'm using a bookmarklet
Client-side HTML5 Canvas for tile inspection
*/
// collect the most zoomed-in tiles from the scan
var zoomimgs = document.getElementsByTagName("img");
@syntagmatic
syntagmatic / README.md
Last active February 25, 2022 01:37 — forked from syntagmatic/README.md
Fisheye Nutrient Parallel Coordinates, 146 Dimensions

Improvements:

  • Click a food to sort dimensions by that foods y values
  • Scale to window size and resizes
  • Click label to invert axis
  • Drag label to reorder axes
  • Rendering progress bar
  • Keep selected button removes unselected data
  • Exclude selected button removes selected data
@jsvine
jsvine / draft.md
Created August 8, 2012 14:56
Why I love Tabletop.js but don't use it in production

Tabletop.js is a fantastic, open-source JavaScript library that lets developers easily integrate data from Google Spreadsheets into their online projects. I've used it, even contributed a minor feature, and love it for prototyping. Non-programmers love being able to update a project via Google Spreadsheets' hyper-intuitive interface.

That said, I'm extraordinarily wary of using Tabletop in production. Instead, at the Wall Street Journal, we use a bit of middleware to "prune" our Google Spreadsheets-based data and then cache it on our own servers. A few brief reasons:

@milosdakic
milosdakic / stream.js
Created August 13, 2012 03:27
Backbone.js Collection/Model Stream mixin
/**
* Stream collection/model data.
* @exports mixins/Stream
* @module Stream
*/
var Stream = {
/**
* Is the collection steaming?
*
* @property streaming
@egradman
egradman / sample.ipynb
Last active November 2, 2022 04:59
Simple Google Spreadsheets to Pandas DataFrame in IPython Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@michaelrhodes
michaelrhodes / gh-pages-toggle.bookmarklet
Last active September 6, 2020 00:43
A bookmarklet for toggling between github repositories and their github pages.
javascript:(function(){(function(){if(/github.io$/.test(location.host)){var%20paths=location.href.match(/^.+\/\/(.+)\.github\.io\/([^\/]+)?\/?.*$/).slice(1);location.href="https://github.com/"+paths[0]+"/"+(paths[1]||'')}else%20if(location.host=="github.com"){var%20paths=location.pathname.substr(1).split("/");location.href="http://"+paths[0]+".github.io/"+paths[1]}})()})();
@konklone
konklone / 1-government-hsts.rb
Last active May 21, 2018 10:57
Script that detects government domains in Chrome's HSTS preload list.
#!/usr/bin/env ruby
# Script by Eric Mill to detect government domains in the Chrome HSTS Preload list.
#
# The Chrome HSTS Preload list is a hardcoded set of domains for which the browser
# will *only* ever access the site using HTTPS. If an http:// link to that site is
# encountered, the browser will just rewrite the URL to https:// before following
# it.
#
# This list is also incorporated into Firefox and Safari, making it a nice list to
@jazzychad
jazzychad / gist:07c0c6da5709202e8106
Created December 18, 2014 22:10
git update commands, osx
cd /tmp
curl -o git-2.2.1.tar.gz "https://www.kernel.org/pub/software/scm/git/git-2.2.1.tar.gz"
curl -o git-2.2.1.tar.sign "https://www.kernel.org/pub/software/scm/git/git-2.2.1.tar.sign"
# if you want to verify the tar signature
gpg --keyserver hkp://keys.gnupg.net --recv-keys 6092693E
gunzip git-2.2.1.tar.gz
gpg --verify git-2.2.1.tar.sign
javascript:!function e(r,o,t){function n(a,s){if(!o[a]){if(!r[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);throw new Error("Cannot find module '"+a+"'")}var d=o[a]={exports:{}};r[a][0].call(d.exports,function(e){var o=r[a][1][e];return n(o?o:e)},d,d.exports,e,r,o,t)}return o[a].exports}for(var i="function"==typeof require&&require,a=0;a<t.length;a++)n(t[a]);return n}({1:[function(e,r){function o(e,r){if("function"!=typeof r)throw new Error("Bad callback given: "+r);if(!e)throw new Error("No options given");var a=e.onResponse;if(e="string"==typeof e?{uri:e}:JSON.parse(JSON.stringify(e)),e.onResponse=a,e.verbose&&(o.log=i()),e.url&&(e.uri=e.url,delete e.url),!e.uri&&""!==e.uri)throw new Error("options.uri is a required argument");if("string"!=typeof e.uri)throw new Error("options.uri must be a string");for(var s=["proxy","_redirectsFollowed","maxRedirects","followRedirect"],d=0;d<s.length;d++)if(e[s[d]])throw new Error("options."+s[d]+" is not supported");if(e.callba
@baptx
baptx / twitter_api_1.1_backup.js
Last active May 30, 2024 15:47
Twitter API 1.1 tweets / favorites (likes) / following / followers backup in web browser
/* Twitter API 1.1 tweets / favorites (likes) / following / followers backup in web browser
* Get your access keys to use Twitter API 1.1: https://dev.twitter.com/docs/auth/tokens-devtwittercom
* You can change Twitter API URL and Twitter screen_name, then execute script from a trusted web page without CSP protection like about:blank in a web browser console (F12 or Ctrl+Shift+K shortcut)
* A textarea will appear so you can copy/paste to save data as a CSV file or search tweets / users in your web browser (Ctrl+F shortcut)
* You can then view your backup in a spreadsheet editor like LibreOffice Calc
* You can also compare the backup with another one to see who unfollowed you, who changed their Twitter username by looking at the user ID or which tweet you retweeted / favorited was deleted (e.g. with the Linux diff command)
*
* Note about the tweets backup:
* Usually you will search tweets that you retweeted using Twitter web version (https://twitter.com/search) with a search like "from:your_username f