Skip to content

Instantly share code, notes, and snippets.

@abstraction
abstraction / optimization.py
Created January 1, 2021 12:03 — forked from naomiajacobs/optimization.py
bnt162b2 Vaccine Codon Optimization
from dnachisel import *
# Subbed in `CCTCCT` for `AAAGTT` to account for proline substitution
virus = 'ATGTTTGTTTTTCTTGTTTTATTGCCACTAGTCTCTAGTCAGTGTGTTAATCTTACAACCAGAACTCAATTACCCCCTGCATACACTAATTCTTTCACACGTGGTGTTTATTACCCTGACAAAGTTTTCAGATCCTCAGTTTTACATTCAACTCAGGACTTGTTCTTACCTTTCTTTTCCAATGTTACTTGGTTCCATGCTATACATGTCTCTGGGACCAATGGTACTAAGAGGTTTGATAACCCTGTCCTACCATTTAATGATGGTGTTTATTTTGCTTCCACTGAGAAGTCTAACATAATAAGAGGCTGGATTTTTGGTACTACTTTAGATTCGAAGACCCAGTCCCTACTTATTGTTAATAACGCTACTAATGTTGTTATTAAAGTCTGTGAATTTCAATTTTGTAATGATCCATTTTTGGGTGTTTATTACCACAAAAACAACAAAAGTTGGATGGAAAGTGAGTTCAGAGTTTATTCTAGTGCGAATAATTGCACTTTTGAATATGTCTCTCAGCCTTTTCTTATGGACCTTGAAGGAAAACAGGGTAATTTCAAAAATCTTAGGGAATTTGTGTTTAAGAATATTGATGGTTATTTTAAAATATATTCTAAGCACACGCCTATTAATTTAGTGCGTGATCTCCCTCAGGGTTTTTCGGCTTTAGAACCATTGGTAGATTTGCCAATAGGTATTAACATCACTAGGTTTCAAACTTTACTTGCTTTACATAGAAGTTATTTGACTCCTGGTGATTCTTCTTCAGGTTGGACAGCTGGTGCTGCAGCTTATTATGTGGGTTATCTTCAACCTAGGACTTTTCTATTAAAATATAATGAAAATGGAACCATTACAGATGCTGTAGACTGTGCACTTGACCCTCTCTCAGAAACAAAGTGTACGTTGAAATCCTTCAC

Productivity Tips for Mac


Recommended Settings:

  1. iTerm2 - A better OSX terminal
    • Shortcuts
      ⌘ + ⏎  # toggle full-screen
      

⌘ + K # clear terminal

@abstraction
abstraction / Brain-Cache-Hits-References
Created November 29, 2020 22:01 — forked from YaronWittenstein/Brain-Cache-Hits-References
References to my talk: "How to Increase Your Brain's Cache Hits?"
* [Anki](http://ankisrs.net)
* [Janki Method](http://www.jackkinsella.ie/2011/12/05/janki-method.html)
* [Janki Method Refined](http://www.oxbridgenotes.co.uk/articles/janki_method_refined)
* [Effective learning: Twenty rules of formulating knowledge](http://www.supermemo.com/articles/20rules.htm)
* [Memorizing a programming language using spaced repetition software](http://sivers.org/srs)
* [Spaced Repetition (Wikipedia)](http://en.wikipedia.org/wiki/Spaced_repetition)
* [SuperMemo (Wikipedia)](http://en.wikipedia.org/wiki/SuperMemo)
* [Pragmatic Thinking and Learning: Refactor Your Wetware (Book)](http://pragprog.com/book/ahptl/pragmatic-thinking-and-learning)
@abstraction
abstraction / supermemo.js
Created November 29, 2020 22:01 — forked from johnlindquist/supermemo.js
supermemo
const {
startOfToday,
addDays,
compareAsc
} = require("date-fns")
const supermemo = (grade, factor = 0, reps = 0) => {
const MAX_GRADE = 5
//0 or 1: No idea.. or Maybe?.
@abstraction
abstraction / SuperMemo.bat
Created November 29, 2020 22:00 — forked from aaaaaaaaaaaaaaaaaxaaaaaa/SuperMemo.bat
SuperMemo.bat Launcher
@echo off
rem change the path below to point at the folder that contains the files you want to backup
cd C:\SuperMemo\systems
:START
git pull
IF EXIST ".lock" (
echo Instance locked. SuperMemo left open on another PC?
set /p nothing="<ENTER>"
@abstraction
abstraction / regex.md
Created November 29, 2020 01:13 — forked from vitorbritto/regex.md
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping
@abstraction
abstraction / basicServiceWorker.js
Created November 24, 2020 07:22 — forked from adactio/basicServiceWorker.js
A basic Service Worker, for use on, say, a blog.
'use strict';
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// http://creativecommons.org/publicdomain/zero/1.0/
(function() {
// Update 'version' if you need to refresh the cache
var staticCacheName = 'static';
var version = 'v1::';
@abstraction
abstraction / README.md
Created November 24, 2020 00:58 — forked from ralfr/README.md
Applescript to launch iTerm2 Version 3+ from OS X Finder via keyboard shortcut or Toolbar

Description

Based on info from http://peterdowns.com/posts/open-iterm-finder-service.html but with modified behavior and fixed to work with iTerm2 version 3 or later. It will not work with older versions of iTerm. The modified behavior is to open a new terminal window for each invocation instead of reusing an already open window. Update - The original author released a build script for the newer iTerm2 versions at https://github.com/peterldowns/iterm2-finder-tools that keeps the original behavior of reusing an open iTerm2 window.

To open iTerm2 at selected folder with keyboard shortcut

  1. Run Automator, select a new Service
  2. Select Utilities -> Run AppleScript
  3. Service receives selected 'folders' in 'finder.app'
  4. Paste script:
@abstraction
abstraction / 0.README.md
Created November 21, 2020 15:09 — forked from agentcooper/0.README.md
Telegram chat backup/export

How to use

  1. Login to https://web.telegram.org
  2. Copy-paste contents of telegram-scripts.js into JS console
  3. Run showContacts() to get the list of contacts with ids
  4. Run saveChat(userId) where userId is the id from step 3

Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.

Motivation

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real