Skip to content

Instantly share code, notes, and snippets.

@markbao
markbao / gist:11187918
Created April 22, 2014 17:36
jQuery stack trace IE7
at http://ladeq.citizenreach.dev/assets/jquery.js?body=1 [2564]
JScript anonymous function
code: return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 )
at http://ladeq.citizenreach.dev/assets/jquery.js?body=1 [1458]
JScript anonymous function
code: val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
fn( elem, name, !documentIsHTML ) :
undefined
at http://ladeq.citizenreach.dev/assets/jquery.js?body=1 [1661]
JScript anonymous function
@markbao
markbao / quip.autofocus.js
Last active August 29, 2015 14:07
Quip Autofocus — Quip's focus mode, accessible by the "Hide Conversation" button, is awesome. But since the majority of the documents I use Quip for are personal documents, I've found it a pain to always have to click it. This incredibly hacky userscript automatically enables focus mode when opening a Quip document. You can go back to the docume…
// Quip Autofocus
// Super hacky, not optimal, but "damn it, it works"
// I'll come up with a better solution after exams
// suggested namespace: *quip.com*
// I use this in a Fluid app as a Userscript. Not tested anywhere else
console.log('quip.autofocus.js - Loading Quip autofocus');
var qafFocusedThread = null; // stores the last focused thread ID
// allows js to only focus once,
Verifying that +markbao is my openname (Bitcoin username). https://onename.io/markbao
@markbao
markbao / draft
Created January 19, 2015 17:17
Draft: The curse of knowledge, beginner’s mind, and barriers to creativity
# The curse of knowledge, beginner’s mind, and barriers to creativity
*“The best way to learn is to learn from those who have come before you, who have figured it out and wrote down their wisdom. So I read to get their knowledge, to take advantage of the work they’ve done to figure it out.”*
But how, then, do you avoid only thinking like them, and making the same mistakes they did? If we assume that once we learn something and take it to heart—we learn something that makes a lot of things make sense—that it’s harder to then reject that idea and think of new ideas that might actually be closer to the truth, how do we avoid thinking like the status quo and never challenging it?
This is a question that I’ve dealt with for most of my life, and over the past year I found out it has a name. The curse of knowledge is the idea that people who have more knowledge are unable to think about things from the perspective of those who have less knowledge. It’s similar to the innovator’s dilemma in that it describes a sit
@markbao
markbao / The Optimization–Cognitive Load Tradeoff
Last active August 29, 2015 14:15
The Optimization–Cognitive Load Tradeoff
## How perfectionism can lead to procrastination and lower performance
Lately, I’ve been exploring what the tradeoffs of optimization are. That is, when we try to optimize what we do in work and life, what are the effects? What actually gets *worse* when we try to make things better?
One that seems obvious is that **more optimization leads to higher cognitive load**. The more we want to do something well, the more mental effort we’ll have to put into doing that task. This doesn’t just amount to the additional work needed to do something well, but I hypothesize that optimizing also seems to involve a *second track* of thinking, running alongside the track of the action itself, that is dedicated to observing how we are doing that action and evaluating whether we are doing it well or not.
If we assume that the need to optimize increases cognitive load, either beacuse the desire to do something well involves more mental effort, or because the simultaneous reflexive self-evaluation of our performance requires u
@markbao
markbao / roughdraft-1.md
Last active August 29, 2015 14:15
The Optimization–Cognitive Load Tradeoff

How perfectionism can lead to procrastination and lower performance

Lately, I’ve been exploring what the tradeoffs of optimization are. That is, when we try to optimize what we do in work and life, what are the effects? What actually gets worse when we try to make things better?

One that seems obvious is that more optimization leads to higher cognitive load. The more we want to do something well, the more mental effort we’ll have to put into doing that task. This doesn’t just amount to the additional work needed to do something well, but I hypothesize that optimizing also seems to involve a second track of thinking, running alongside the track of the action itself, that is dedicated to observing how we are doing that action and evaluating whether we are doing it well or not.

If we assume that the need to optimize increases cognitive load, either beacuse the desire to do something well involves more mental effort, or because the simultaneous reflexive self-evaluation of our performance requires

{"columns":["r"],"data":[{"row":[{}],"graph":{"nodes":[{"id":"0","labels":["JournalArticle"],"properties":{"uuid":"9636e991-2fe4-40d2-ac23-515b55445ba0","title":"Repositioning your perspective to achieve goals","slug":"repositioning-your-perspective-to-achieve-your-goals","subtitle":"Cognitive constructs to maintain goals","view_type":"normal","tag_string":"psychology,goals","content":" <p>Sebastian Marshall wrote a great article about a way to <a href=\"http://www.sebastianmarshall.com/self-destruction-is-generally-counterproductive\" onclick=\"javascript:_gaq.push(['_trackEvent','outbound-article','http://www.sebastianmarshall.com']);\">prevent yourself from “giving in” when you’re working towards a goal</a>. Often times, I say “screw it, I finished such-and-such medium-sized project, let’s dig into some steak/these brownies/some dessert… I haven’t in a long time.” Not only is it dangerous, but you eventually lower the criteria for “event for celebration”, and it’s so easy to give in.</p>\r\n<p>O
@markbao
markbao / twitter-list-in-menu-bar.js
Last active August 29, 2015 14:26
Userscript to add a Twitter list to the Twitter web interface's menu bar. Looks like this: http://i.imgur.com/ji9TLOU.png
// ==UserScript==
// @name Twitter List in Menu Bar
// @description Userscript to add a Twitter list to the Twitter web interface's menu bar. By Mark Bao. Looks like this: http://i.imgur.com/ji9TLOU.png
// @version 1
// @namespace https://twitter.com/
// @include https://twitter.com/*
// ==/UserScript==
var text = '<li class="list-item">\
<a role="button" href="[REPLACE-ME]-https://twitter.com/username/lists/list-name" class="" data-placement="bottom" data-original-title="">\
<html>
LOL