This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This program spins up php-fpm in the background and a Go web server sending | |
// all requests to a PHP router script. | |
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! The stringsim program prints out the trigram similarity of two strings | |
//! using what appears to be the same algorithm used by Postgres. | |
//! https://www.postgresql.org/docs/9.1/pgtrgm.html | |
use std::collections::HashSet; | |
use std::hash::Hash; | |
fn main() { | |
let args: Vec<String> = ::std::env::args().collect(); | |
if args.len() != 1+2 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="d">nothing here yet</div> | |
<script> | |
var send = XMLHttpRequest.prototype.send; | |
XMLHttpRequest.prototype.send = function(body) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="module"> | |
import {html, render} from 'https://unpkg.com/lit-html?module'; | |
const myTemplate = (name) => html`<p>Hello ${name}</p>`; | |
render(myTemplate('World'), document.body); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head></head> | |
<body> | |
<my-element></my-element> | |
<script type="module"> | |
import {LitElement, html} from 'https://unpkg.com/@polymer/lit-element@latest/lit-element.js?module'; | |
class MyElement extends LitElement { | |
render() { |
OlderNewer