Skip to content

Instantly share code, notes, and snippets.

#
# Proof of concept - import maps with JSX transpilation. Can trivially
# be extended to TypeScript and all the languages currently supported
# with Sprockets.
#
# There are two parts to this:
# * Have `find_javascript_files_in_tree` in importmap-rails to not only
# find JS files, but also files that can be transpiled to JS.
# * Add sprockets JSX transformer, making use of esbuild
#
const icalgen = require('ical-generator');
const fs = require('fs').promises;
const path = require('path');
const deepEqual = require('deep-equal');
const input = '/home/rubys/svn/www.apachecon.com/acah2020/tracks';
const output = '/home/rubys/svn/www.apachecon.com/acah2020/calendar';
// Configure babel
require('@babel/register')({
rm -rf multisvn
mkdir multisvn
cd multisvn
mkdir repo
svnadmin create repo/r1
# initial setup
svn checkout file://$(pwd)/repo/r1
mkdir -p r1/foo/bar
touch r1/foo/bar/file1
@rubys
rubys / omakase.md
Last active September 19, 2018 23:40
The menu is omakase

Rails doctrine: The menu is omakase (translation: I'll leave it up to you)

Preface

I'm going to try to make the case that instead of focusing on Module requirements, we should focus on Loader requirements and let a thousand flowers bloom. Part of making my case, I will introduce a number of new use cases that may have here-to-fore seemed out of reach.

Parallel Evolution

@rubys
rubys / first-immediate-child.html
Created August 22, 2018 11:09
if the first item in a div is an h3, don't put a border on it
<!DOCTYPE html>
<style>
h3 {border: 1px solid black}
div>h3:first-child {border: none}
</style>
<div>
<h3>..</h3> <!-- no border on h3 -->
<p>....</p>
</div>
'use strict';
require('../common');
const assert = require('assert');
const { spawn } = require('child_process');
const input = `
import('path').then(
(path) => {process.stdout.write(path.delimiter)},
console.log
);
Started by upstream project "node-compile-windows" build number 19474
originally caused by:
Started by upstream project "node-test-commit-windows-fanned" build number 19355
originally caused by:
Started by upstream project "node-test-commit" build number 19846
originally caused by:
Started by upstream project "node-test-pull-request" build number 15917
originally caused by:
Started by user Rich Trott
[EnvInject] - Loading node environment variables.
This file has been truncated, but you can view the full file.
{
"miscs": [
{
"textRaw": "About this Documentation",
"name": "About this Documentation",
"introduced_in": "v0.10.0",
"type": "misc",
"desc": "<p>The goal of this documentation is to comprehensively explain the Node.js\nAPI, both from a reference as well as a conceptual point of view. Each\nsection describes a built-in module or high-level concept.</p>\n<p>Where appropriate, property types, method arguments, and the arguments\nprovided to event handlers are detailed in a list underneath the topic\nheading.</p>\n",
"miscs": [
{