I set up my static site to build with GitHub Actions and then deploy to Deno Deploy.
The workflow file is here:
https://github.com/croaky/blog/blob/main/.github/workflows/deno.yml
This is working great! The site is live at:
#!/usr/bin/env ruby | |
# createdb db | |
# chmod +x dataclips.rb | |
# DATABASE_URL=postgres:///db ./dataclips.rb | |
require "bundler/inline" | |
require "csv" | |
gemfile do |
I set up my static site to build with GitHub Actions and then deploy to Deno Deploy.
The workflow file is here:
https://github.com/croaky/blog/blob/main/.github/workflows/deno.yml
This is working great! The site is live at:
--- | |
rvm: | |
- 2.0.0 | |
before_install: | |
- "echo 'gem: --no-document' > ~/.gemrc" | |
- "echo '--colour' > ~/.rspec" | |
- gem install fog | |
- "./script/travis/bundle_install.sh" | |
- export DISPLAY=:99.0 |
import * as React from 'react' | |
// routing, etc. | |
import { Reset } from '~/ui/shared/Reset' | |
export class App extends React.Component { | |
public render() { | |
return ( | |
<div> | |
<title>Dashboard</title> |
module DelayedJob | |
module Matchers | |
def enqueue_delayed_job(handler) | |
DelayedJobMatcher.new handler | |
end | |
class DelayedJobMatcher | |
def initialize(handler) | |
@handler = handler | |
@attributes = {} |
A few lines of Ruby with pg
driver
is a simple alternative to a job queuing library.
Job queues are defined as database tables
and workers are defined in one Ruby file.
queuea: bundle exec ruby queue/a.rb
queueb: bundle exec ruby queue/b.rb
Periodically use pgbackups to pull latest production data.
Merge master into staging
git checkout master
git reset --hard origin/master
git pull
git checkout staging
git reset --hard origin/staging
#!/bin/bash | |
# Make a circular favicon from your GitHub avatar | |
# | |
# ./favicon.sh username | |
set -eu | |
if ! command -v convert >/dev/null; then | |
echo "error: ImageMagick isn't installed." >&2 |
The two most common performance symptoms are with throughput or timeouts.
An application's maximum throughput can be measured by how many requests per second it serves; New Relic reports this number as "rpm," which means "requests per minute." Throughput will be limited by how long the average request takes to process and how may servers are available to handle processes. Heroku calls these servers "dynos."