I hereby claim:
- I am danallison on github.
- I am danallison (https://keybase.io/danallison) on keybase.
- I have a public key ASDUznCpicoQz-TtNd0WOBIMNXMAYktgZzXbIRT3TjIJlAo
To claim this, I am signing this object:
Brain fog coping strategies | |
Intro: Playfulness and experimentation will help you find strategies that work for you. | |
Memory | |
Navigating your memory landscape (vs constructing memory palaces) | |
The problem with mnemonics | |
Mnemonic techniques (such as memory palaces) are powerful, but ... | |
Mnemonics only help when you know ahead of time exactly what you want to remember _and_ when writing it down is not sufficient _and_ when you have the time and energy to do the encoding | |
Very few cases meet this criteria | |
Memorizing foreign language vocabulary | |
Memorizing material for an exam |
from datetime import datetime | |
from math import sin, cos, pi | |
days_in_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] | |
def sin_cos(n): | |
theta = 2 * pi * n | |
return (sin(theta), cos(theta)) | |
def get_cycles(d): |
# https://en.wikipedia.org/wiki/Second-level_domain | |
# https://www.quackit.com/domain-names/country_domain_extensions.cfm | |
from collections import defaultdict | |
second_level_domains_by_country_code = defaultdict(set) | |
d = second_level_domains_by_country_code | |
# Afghanistan | |
d['af'] = set(( | |
'com', | |
'edu', |
from sshtunnel import SSHTunnelForwarder | |
from sqlalchemy import create_engine | |
from sqlalchemy.orm import sessionmaker | |
from functools import wraps | |
# secrets.py contains credentials, etc. | |
import secrets | |
def get_engine_for_port(port): | |
return create_engine('postgresql://{user}:{password}@{host}:{port}/{db}'.format( |
import requests | |
import datetime | |
auth_token = '** replace this with your auth token **' | |
def get_time_entries_for_project(project_id, date_range=None): | |
''' | |
Fetches time entries from the API, including suggestions and phases | |
''' | |
base_url = 'https://api.10000ft.com' |
I hereby claim:
To claim this, I am signing this object:
function flowMap () { | |
var functions = [].slice.call(arguments); // convert arguments to array | |
return function () { | |
var _this = this; // maintain context | |
return functions.reduce(function (args, fn) { | |
// for each function or array of functions, | |
// pass in the previous return value. | |
if (_.isArray(fn)) { | |
return [fn.map(function (_fn) { return _fn.apply(_this, args); })]; | |
} else { |
function downloadString(text, fileType, fileName) { | |
var blob = new Blob([text], { type: fileType }); | |
var a = document.createElement('a'); | |
a.download = fileName; | |
a.href = URL.createObjectURL(blob); | |
a.dataset.downloadurl = [fileType, a.download, a.href].join(':'); | |
a.style.display = "none"; | |
document.body.appendChild(a); | |
a.click(); |
dispatcher = {} | |
dispatcher._subscribers = {} | |
dispatcher.on = (eventName, callback, context) -> | |
(dispatcher._subscribers[eventName] or = []) | |
.push { | |
callback: callback | |
context: context | |
} |