Skip to content

Instantly share code, notes, and snippets.

View captainsafia's full-sized avatar

Safia Abdalla captainsafia

View GitHub Profile
export const updateDisplayEpic = (
action$: ActionsObservable<
actions.NewKernelAction | actions.KillKernelSuccessful
>
) =>
// Global message watcher so we need to set up a feed for each new kernel
action$.pipe(
ofType(actions.LAUNCH_KERNEL_SUCCESSFUL),
switchMap(
(action: actions.NewKernelAction | actions.KillKernelSuccessful) =>

Template for longer design doc

I use this when I feel that I need more structure to organize my thinking around a problem.

Problem

Goals

Proposed Solution

Implementation

Note: This is different from proposed solution because it will go into technical details.

Testing and Perf

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some more thoughts on this, I also took the time to enumerate what a FSM machine for the kernel would look like. The goals of this FSM are as follows:

  • Convey relevant information to the user about the state of the kernel
  • Compliment the limited set of states provided by the Jupyter messaging protocol

<div onload="alert('who will win: an entire security team or one hacky script')">test</div>
#!/usr/bin/env python
# Copyright (C) 2006 Andrew Straw <[email protected]>
#
# This program can be distributed under the terms of the GNU LGPL.
# See the file COPYING.
#
import os, stat, errno
# pull in some spaghetti to make this stuff work without fuse-py being installed

Realtime collaboration

While we don't have to ship with this out of the gate, we need to think about realtime collaboration for the future. Might as well write it here in a hackpad too while we're at it. ;)

Single User Multi User

Even for the case of the local desktop application, we need to be able to work with ourselves (multiple cursors and contexts), if we have the same notebook opened twice. This is even more important for a web based version of nteract.

Getting it working for a single user with multiple instances is 90% of the solution. [The other 10% includes: proper handling of undo with multiple editors at once; showing other cursors (and making it easy to jump to them), which isn't really needed for single user; out of band chat (something on the side, etc. that isn't in the document); if you have any form of history, then showing who did what.]

@captainsafia
captainsafia / mac_dev_setup.sh
Created August 14, 2018 01:06
A set of commands I use to configure my Mac for development
# Create a global gitignore for macOS
cat https://raw.githubusercontent.com/github/gitignore/master/Global/macOS.gitignore >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
# Send screenshots to a directory that isn't the desktop
mkdir -p ~/Screenshots
defaults write com.apple.screencapture location ~/Screenshots
# Show all hidden files (like dotfiles)
defaults write com.apple.finder AppleShowAllFiles YES; killall Finder;
'use strict';
var BLOCKED_DOMAINS = [
'reddit.com',
'news.ycombinator.com',
'8chan.co',
'4chan.org'
];
var matched = null;