Skip to content

Instantly share code, notes, and snippets.

View bsmth's full-sized avatar

Brian Thomas Smith bsmth

View GitHub Profile
@willurd
willurd / web-servers.md
Last active April 18, 2024 14:15
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@gjtorikian
gjtorikian / homepage_spec.rb
Last active December 5, 2019 20:28
Basic Capybara testing with Jekyll + Rack
require 'spec_helper'
describe "Homepage" do
before :each do
visit "/index.html"
end
it "has a title" do
expect(page).to have_css("h1", text: "GitHub Help")
@caugner
caugner / github-prs-with-size.js
Created October 31, 2023 17:00
Last 1000 mdn/content PRs with size metrics as CSV
import { writeFileSync } from "node:fs";
import { octokit } from "./lib.js";
async function pullRequests(login, repo, limit, { columns }) {
const items = [];
let after = null;
let hasNextPage = false;
do {