Skip to content

Instantly share code, notes, and snippets.

View gabrielgrant's full-sized avatar

Gabriel Grant gabrielgrant

View GitHub Profile
@gabrielgrant
gabrielgrant / README.md
Created October 25, 2021 14:14
Simple example of Astro's upcoming v0.21 (v2 compiler) failing to serve a the minimal template

Repro steps:

$ npm init astro

# select Minimal

$ git add .
$ git commit -m "Init minimal Astro structure"
$ npm install astro@next--compiler
@gabrielgrant
gabrielgrant / controllers.application\.js
Last active June 11, 2020 22:19
persistent mapbox markers MCVE
import Controller from '@ember/controller';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
const center = {lng: 79.3832, lat: 43.6532};
function generateModel() {
return Array(3).map(pt => ({
lng: center.lng + Math.random() / 10,
import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';
export default class ApplicationController extends Controller {
queryParams = ['projects', 'roles'];
@tracked projects = [];
@tracked roles = [];
}
@gabrielgrant
gabrielgrant / submit_gh_issues.py
Created December 17, 2019 12:31
Script to submit a list of issues to GH that have been collected in a single text file
#!/usr/bin/env python
"""
Submit a list of issues to GH
Issues are separated by two blank lines (three newline characters)
The first line is used as the title
"""
# py2/3 compat
[
[ 1, 2, 3, 4, 5],
[ 6, 7, 8, 9, 10],
[11, 12, 13, 14, 15],
[16, 17, 18, 19, 20],
[21, 22, 23, 24, 25]
]
#! /bin/bash
set -e
usage() {
echo "
Usage:
$0 <base NodePort> BASE_MANIFEST
Takes BASE_MANIFEST (which should be the JSON result of
// all measurements in inches, because AMERICA
function main () {
// standard 4" sewer pipe
const innerRadius = 4/2;
const outerRadius = 4.215/2;
const length = 20 * 12; // by "6m" i assume you mean 20ft?
return difference(
circle({r: outerRadius, center: true}),
apiVersion: v1
kind: ReplicationController
metadata:
annotations:
pipelineName: edges
creationTimestamp: 2019-01-26T01:48:54Z
generation: 4
labels:
app: pipeline-edges-v1
component: worker
import Ember from 'ember';
import AFrame from 'aframe';
import Animation from 'npm:aframe-animation-component';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});