Skip to content

Instantly share code, notes, and snippets.

Ten to Zen

  1. Let go of comparing.
  2. Let go of competing.
  3. Let go of judgments.
  4. Let go of anger.
  5. Let go of regrets.
  6. Let go of worrying.
  7. Let go of blame.
  8. Let go of guilt.
From e11b753cdbe8a1e911750679bec065c0efac6c7f Mon Sep 17 00:00:00 2001
From: Devin Weaver <suki@tritarget.org>
Date: Tue, 13 Oct 2015 12:51:48 -0400
Subject: [PATCH] Add documentation for README_mac.txt
This is long over due. I realize that the Mac versions of things have
moved to MacVim and most people install via Homebrew without giving
second thought to the actual Vim source. However, I tend to jump to
README_mac.txt when I clone the Vim source. Every time I do a small
little kitten in Suburbia Ville cries uncontrollably. I can't be the
#!/usr/bin/env node
var Writable = require('stream').Writable;
var Util = require('util');
function FloorCounter() {
Writable.call(this);
this.floor = 0;
this.position = 0;
this.enteredBasementAt = null;
// $ node so_example.js 2000000000 > /dev/null
// FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
// Aborted (core dumped)
var util = require('util');
var stream = require('stream');
var crypto = require('crypto');
util.inherits(PasscodeGenerator, stream.Readable);
util.inherits(Hasher, stream.Transform);
function findLongestWord(str) {
return Math.max(...str.split(' ').map(val => val.length));
}
findLongestWord('The quick brown fox jumped over the lazy dog');
/*\
title: $:/core/modules/utils/dom/enhanced-popup.js
type: application/javascript
module-type: utils
An enhanced version of the Popup for support of absolute positioning
\*/
var CorePopup = require('core/modules/utils/dom/popup.js');

I was experimenting with some of the ideas that Sandi Metz was talking about in her Nothing is Something talk in ES2015 and ran into a conceptual conundrum. I was going to post on https://programmers.stackexchange.com but realized the contrived example would be to long for a question.

Say I have a list of story titles. Which match to Story objects. My object the StorySaver encapsulates a Story and provides an interface to a) determine if the Story is a draft or not and b) send the Story to a server. The Story

@sukima
sukima / about.template.hbs
Created January 29, 2016 17:50
Broken Routes
This is a test
@sukima
sukima / machine.js
Created February 7, 2020 14:57
Generated by XState Viz: https://xstate.js.org/viz
const FORM_MANAGER = {
id: 'rule-form-manager',
initial: 'blank-form',
states: {
'blank-form': {
on: {
PICK_ADDRESS_FAMILY: [
{ target: 'ipv4-address-any-port', cond: (_, { value }) => value === 'IP4' },
{ target: 'ipv6-address-any-port', cond: (_, { value }) => value === 'IP6' },
{ target: 'any-address-any-port', cond: (_, { value }) => value === 'ANY' },
@sukima
sukima / machine.js
Last active May 9, 2024 23:55
Generated by XState Viz: https://xstate.js.org/viz
function createMachine() {
return Machine({
id: 'example-form-manager',
type: 'parallel',
context: {
canSelectNone: true,
advancedProtocol: '',
ip4Address: '',
ip6Address: ''
},