Skip to content

Instantly share code, notes, and snippets.

View jvaill's full-sized avatar

Justin Vaillancourt jvaill

  • Canada
View GitHub Profile
@jvaill
jvaill / domain_squeeze.rb
Created March 24, 2012 17:47
Finds available domain names
#
# Domain Squeeze PoC
# by Justin Vaillancourt - @jvaill
#
# usage: ruby domain_squeeze.rb "search query"
#
# dependencies:
# => whois
# => text-hyphen
# => text
@jvaill
jvaill / auth-token.js
Created November 1, 2014 23:11
Auth token middleware for Connect.
var _ = require('underscore');
/*
* Auth token middleware for Connect.
*
* Looks at the `X-Auth-Token` header and compares it against `authToken`.
*
* `authToken` can be a string or a function that takes an input authentication
* token and returns a boolean that indicates whether authentication succeeds.
*/
import { schema } from "prosemirror-schema-basic";
import { EditorState } from "prosemirror-state";
import { EditorView } from "prosemirror-view";
import { Step } from "prosemirror-transform";
import { collab, sendableSteps, getVersion, receiveTransaction } from "prosemirror-collab";
import { undo, redo, history } from "prosemirror-history";
import { keymap } from "prosemirror-keymap";
import { baseKeymap } from "prosemirror-commands";
@jvaill
jvaill / main.tsx
Last active January 21, 2024 22:08
A tiny file-based router for Vite!
import React from "react";
import ReactDOM from "react-dom/client";
import { Outlet, TinyViteRouter } from "/tiny-vite-router.tsx";
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<TinyViteRouter>
<Outlet />
</TinyViteRouter>