import os | |
import arel | |
from fastapi import FastAPI, Request | |
from fastapi.templating import Jinja2Templates | |
app = FastAPI() | |
templates = Jinja2Templates("templates") | |
if _debug := os.getenv("DEBUG"): |
#!/usr/bin/env ruby | |
# Generate a dbdiagram for dbdiagram.io from a dbt project. | |
# | |
# Usage: | |
# 1. Run `dbt docs generate` first. | |
# 2. Run `dbt_to_dbdiagram.rb` | |
# 3. Paste the output in https://dbdiagram.io/ | |
require 'yaml' | |
require 'json' |
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
/** | |
* Respond to the request | |
* adapted from https://github.com/xiaoyang-liu-cs/workers-proxy | |
* @param {Request} request | |
*/ | |
async function handleRequest(request) { |
#!/usr/bin/env python | |
import json | |
import copy | |
import sys | |
import argparse | |
from datetime import datetime, timedelta | |
from subprocess import Popen, PIPE | |
# dictionary of partiton names to variable generating functions |
Ruby's regular expressions are unusually powerful. Postgres' regular expressions are not as powerful, but they come close; close enough that it's possible to do many pattern-based queries and string transformations entirely in a query.
And sometimes, it's very useful to have a single regular expression that works
#!/usr/bin/env ruby | |
# | |
# Example Ruby CLI script to retrieve worker data from Workday | |
# Call on command line with worker id; prints worker name | |
# add "request" or "response" after worker id and prints the | |
# outgoing xml or received hash and exits. | |
# | |
# Using Savon version 2 for the SOAP client (2.11.2) | |
# | |
# Savon defaults to making the message tag the same as the operation name |
On OS/X Sierra, after recently running a brew update
I started receiving the error message Sorry, you can't use byebug without Readline
when trying to run some rake tasks in my ruby project folder. I observed this in projects and gems that include byebug
or pry
in their Gemfile
or gem.spec
. I've found in my googling that many begin encountering this error message after running a brew update
but there are other triggering conditions as well.
>> rake aws:show_config
WARN: Unresolved specs during Gem::Specification.reset:
mime-types (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Sorry, you can't use byebug without Readline. To solve this, you need to