Skip to content

Instantly share code, notes, and snippets.

@jonathanhudak
jonathanhudak / branch.cmd
Created October 12, 2016 21:24
Windows Copy Current Git Branch to Clipboard
doskey branch=git rev-parse --abbrev-ref HEAD ^| clip
.FloorPlan
.FloorPlan-nav
div: a.FloorPlan-navButton.active(href="#mainHall")
span.number 1.
span Main Hall
div: a.FloorPlan-navButton(href="#diningHall")
span.number 2.
span Dining Hall
div
span.number 3.
@jonathanhudak
jonathanhudak / install.sh
Last active July 25, 2018 14:18
Setup Ubuntu Instance For Headless WP
#!/bin/bash
# Install Docker!
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
import { Application } from 'https://deno.land/x/oak/mod.ts'
import router from './routes.ts'
const HOST = '127.0.0.1'
const PORT = 7700
const router = new Router()
router.get('/books', getBooks)
/// <reference path="https://deno.land/x/deploy@0.2.0/types/deploy.ns.d.ts" />
/// <reference path="https://deno.land/x/deploy@0.2.0/types/deploy.fetchevent.d.ts" />
/// <reference path="https://deno.land/x/deploy@0.2.0/types/deploy.window.d.ts" />
/*
Reference
* https://strapi.io/blog/rendering-react-ssr-with-deno-and-deno-deploy
*/
import * as React from "https://esm.sh/react@17.0.2";
import { Application } from 'https://deno.land/x/oak/mod.ts'
import { Router }from 'https://deno.land/x/oak/mod.ts'
/*
Sources:
- https://dev.to/am77/deno-v1-0-303j
*/
@jonathanhudak
jonathanhudak / strapi-demo.tsx
Last active March 15, 2022 06:21 — forked from Symbitic/strapi-demo.tsx
Strapi Deno example.
/// <reference path="https://deno.land/x/deploy@0.2.0/types/deploy.ns.d.ts" />
/// <reference path="https://deno.land/x/deploy@0.2.0/types/deploy.fetchevent.d.ts" />
/// <reference path="https://deno.land/x/deploy@0.2.0/types/deploy.window.d.ts" />
import * as React from "https://esm.sh/react@17.0.2";
import * as ReactDOMServer from "https://esm.sh/react-dom@17.0.2/server";
import { createElement as h } from "https://esm.sh/react@17.0.2";
// @ts-ignore VSCode occasionally complains that Deno is not defined.
/// <reference path="https://deno.land/x/deploy@0.2.0/types/deploy.ns.d.ts" />
/// <reference path="https://deno.land/x/deploy@0.2.0/types/deploy.fetchevent.d.ts" />
/// <reference path="https://deno.land/x/deploy@0.2.0/types/deploy.window.d.ts" />
/*
Reference
* https://strapi.io/blog/rendering-react-ssr-with-deno-and-deno-deploy
*/
import * as React from "https://esm.sh/react@17.0.2";
import mdx from "https://esm.sh/@mdx-js/mdx@2.0.0-ci.53?target=deno";
export { mdx };
@jonathanhudak
jonathanhudak / index.ts
Created May 6, 2022 15:44
mini-playroom-idea
import lzString from "https://esm.sh/lz-string";
import { Application, Router } from "https://deno.land/x/oak/mod.ts";
const router = new Router();
router
.get("/", (ctx) => {
ctx.response.body = "Hello world!";
})
.post("/save", async (ctx) => {
const result = ctx.request.body({ type: "text" });