Skip to content

Instantly share code, notes, and snippets.

@tomcritchlow
tomcritchlow / bookmarklet.js
Created February 4, 2022 21:13
Gist code for Electric Tables V0.2.
// Convert this JS code into a bookmarklet using a tool like: http://js.do/blog/bookmarklets/
// Be sure to add your own macro_url and spreadsheet_url
var macro_url = "THIS IS YOUR MACRO URL";
var spreadsheet_id = "THIS IS YOUR SPREADSHEET URL";
var iframe = document.createElement("iframe");
iframe.setAttribute("name","dummyframe");
iframe.setAttribute("id","dummyframe");
iframe.setAttribute("style","display:none;");
javascript: (function() {
function removeEmpty(elem) {
var children = elem.children;
for (var i = 0; i < children.length; i++) {
if (children[i].textContent.trim() === '' && children[i].innerHTML.trim().length === 0) children[i].parentNode.removeChild(children[i]);
}
return elem;
}
function convertAbsolute(url) {
---
layout: default
---
<section class="post">
<h2>{{ page.title }}</h2>
{{ content }}
<div class="flex flex-wrap w-100">
{% for project in site.projects %}
@tomcritchlow
tomcritchlow / 7books.py
Created November 9, 2010 23:23
The main code for 7books (www.7bks.com)
import cgi
import os
from google.appengine.ext.webapp import template
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from google.appengine.api import memcache
from google.appengine.api import urlfetch
@tomcritchlow
tomcritchlow / book-urlnotes.json
Last active August 13, 2020 10:39
V0.1 for a library.json spec as outlined here: https://tomcritchlow.com/2020/04/15/library-json/
{
"title": "Tempo - timing, tactics and strategy in narrative-driven decision-making",
"id": null,
"author": "Venkatesh Rao",
"link": "https://www.amazon.com/Tempo-tactics-strategy-narrative-driven-decision-making-ebook/dp/B0069CHSLW",
"image": null,
"date_finished": "09/09/19",
"notes": [
"https://tomcritchlow.com/2020/04/13/tempo-notes-chapter-2/",
"https://tomcritchlow.com/2020/04/13/tempo-notes-chapter-1/"
@tomcritchlow
tomcritchlow / hypothesis-gist.js
Last active June 29, 2020 16:29
Current customization for hypothesis annotation layer. See post here: https://tomcritchlow.com/2019/02/12/annotations/
<script type="application/json" class="js-hypothesis-config">
{
"openSidebar": false,
"theme": "clean"
}
</script>
<script src="https://hypothes.is/embed.js" async></script>
<script type="text/javascript">
- Admin
- Client contact:
- Project start date:
- Fee:
- **Project Thesis**
- Thesis statement
- #todo
- Task 1
- Meeting Notes
- [[June 1st, 2020]] - Met with Person A, Person B
@tomcritchlow
tomcritchlow / thread-embedder.js
Last active April 1, 2020 14:42
A bookmarklet to grab the URLs in a tweet thread and copy all the embed code to the clipboard
javascript: (function() {
var username = document.location.href.split("/")[3];
var urls = document.querySelectorAll("a");
var tweets = "<blockquote class='twitter-tweet' data-conversation='none'><a href='https://twitter.com"+document.location.href+"'></a></blockquote><script async src='https://platform.twitter.com/widgets.js' charset='utf-8'></script>\n\n";;
var count = 1;
urls.forEach(myFunction);
function myFunction(item, index) {
if(item.getAttribute("href").includes(username+"/status/") && !(item.getAttribute("href").includes("/retweets")) && !(item.getAttribute("href").includes("/likes"))){
I like this idea - that the most useful thing you need client input and co-creation on is the “base reality” - the “Who, What, Where”. For consultants coming in from the outside attempting to “solve problems” for clients the biggest flaw in generic strategies is not properly accounting for who is at the company, what we’re actually trying to solve and where this strategy will play out{% include tufte-sn.html id="just" content="Recall from <a href='https://tomcritchlow.com/2019/11/19/optimism-operating-system/'>chapter 2</a> - there is no 'just' in consulting - clients are ecosystems in balance..." %}.