Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jessegrosjean's full-sized avatar
🏠
Working from home

Jesse Grosjean jessegrosjean

🏠
Working from home
View GitHub Profile
@jessegrosjean
jessegrosjean / Full-Markdown.md
Last active July 11, 2023 15:53 — forked from allysonsilva/Full-Markdown.md
⚡️ Full Markdown Example
  • Finish my changes Hello world

  • Finish my changes Hello world

  • Note done

import Foundation
/// KillRing with macOS text text system semantics.
///
/// Use when implementing `yank:` and `yankAndSelect:` actions.
///
/// Learn more at http://hogbaysoftware.com/posts/mac-text-editing-mark-kill-yank/
public class KillRing {
public static let shared = KillRing()
import Combine
import Foundation
import CoreGraphics
protocol Store {
associatedtype Object
func insert(_ object: Object) -> Future<Object, Error>
func update(_ object: Object) -> Future<Object, Error>
func delete(_ object: Object) -> Future<Object, Error>
// Originally based off https://github.com/BurntSushi/ripgrep/tree/master/ignore
// Use as you see fit.
use std::fs;
use std::fs::{Metadata, FileType};
use std::sync::{Arc, Mutex};
use std::sync::mpsc::{channel, Receiver, Sender};
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering as AtomicOrdering};
use std::collections::BinaryHeap;
use std::path::{Path, PathBuf};
// Demos odditly in NSTextStorage subclass deinit.
//
// 1. Profile app in Allocations Instrument
// 2. Notice that after starting app 3 instances of MyTextStorage remain ... even though MyTextStorage.deinit is getting called.
// 3. Comment out the `let _ = self` line and the problem goes away.
// 4. I only notice this problem in subclasses of NSTextStorage, generally `let _ = self` seems fine in an deinit
//
class MyTextStorage: NSTextStorage {
override init() {
@jessegrosjean
jessegrosjean / TaskPaperParser.md
Last active February 29, 2020 12:45
TaskPaper 3 Parser (May 18, 2016)

Please see birch-outline. It will parse, process, and serialize TaskPaper files for you.

@jessegrosjean
jessegrosjean / AppDispatcher.js
Last active December 23, 2015 01:03
Reflux style wrapper around Flux
var copyProperties = require('react/lib/copyProperties'),
Dispatcher = require('flux').Dispatcher,
util = require('util');
function AppDispatcher() {
Dispatcher.call(this);
this._queue = [];
}
util.inherits(AppDispatcher, Dispatcher);
@jessegrosjean
jessegrosjean / main.js
Last active August 29, 2015 14:02 — forked from dohzya/main.js
define(function (require, exports, module) {
'use strict';
var Extensions = require('ft/core/extensions').Extensions;
function test(editor, options, tagName) {
var collapseNodes = [];
function fun(node) {
var infos;
@jessegrosjean
jessegrosjean / Example Document.ft
Created November 14, 2012 21:41
FoldingText – Autofocus System
# Autofocus.todo
- item 1
- item 3
# Autofocus.todo
- item 2