Mix.install([
{:kino, github: "livebook-dev/kino", ref: "hb-support-process-labels"}
])
#!/usr/bin/env bash | |
# Abort sign off on any error | |
set -e | |
# Start the benchmark timer | |
SECONDS=0 | |
# Repository introspection | |
OWNER=$(gh repo view --json owner --jq .owner.login) |
# This should be triggered through a cron job at 6:15 PM on week days. | |
# Example cron: 15 18 * * 1,2,3,4,5 cd ~/code/jury_duty && ~/.rbenv/shims/ruby call.rb >> ~/code/jury_duty/call-log.txt 2>&1 | |
# It uses Twilio to make a call based on TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, and TWILIO_PHONE. | |
# It calls the JURY_PHONE, transcribes it, looks for JURER_NUMBER and texts the result to PERSONAL_PHONE. | |
require "rubygems" | |
require "bundler/setup" | |
Bundler.require(:default) | |
Dotenv.load |
ask
is a little CLI I made to interact with OpenAI's GPT-3 (text-davinci-002
) from my shell/terminal. The instruction fine-tuning on that model makes it particularly ideal for just asking questions and making requests.
With this CLI, I can do something like:
$ ask 'Write a haskell function that reverses a string'
reverseString :: String -> String
reverseString = foldl (\acc x -> x : acc) []
#!/usr/bin/env ruby | |
require "pathname" | |
common_ancestor_sha = `git merge-base HEAD origin/master`.strip | |
commit_messages = `git log --pretty=format:"%B" #{common_ancestor_sha}..HEAD` | |
if commit_messages.include?("[skip schema checks]") | |
puts "Found [skip schema checks] tag, skipping db migration check." | |
exit |
#!/usr/bin/env node | |
const cheerio = require('cheerio') | |
const fetch = require('node-fetch') | |
const loki = require('lokijs') | |
const telegram = require('telegram-bot-api') | |
const api = new telegram({ token: process.env.TELEGRAM_API }); | |
const db = new loki('rightmoveFile', { | |
autoload: true, |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
I've been doing some work lately with JSON documents in PostgreSQL using jsonb
columns. You can query these documents
using a GIN index in PG, but the syntax can be a little cumbersome
SELECT "events".* FROM "events" WHERE "events"."body" @> '{"shift":{"user_id":2}}'
You have to construct the right side of the query as a JSON string, which is a bit annoying. So I wondered if I could adapt Arel to do the tedious stuff for me.
source 'http://rubygems.org' | |
gem 'plexus' | |
gem 'gratr' # dependency of plexus to visualize graphs |