Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
import datetime | |
import json | |
import os.path | |
import requests | |
# TO DO: Enter Your BC Account ID | |
# Example: 999999999 from https://3.basecamp.com/999999999/ | |
BC_ACCOUNT_ID = "<your-client-id>" | |
# Basecamp App Integration Information |
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: blue; icon-glyph: brain; | |
let items = await loadItems() | |
if (config.runsInWidget) { | |
let widget = await createWidget(items) | |
Script.setWidget(widget) | |
} else if (config.runsWithSiri) { | |
let firstItems = items.slice(0, 5) | |
let table = createTable(firstItems) |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: example | |
namespace: default | |
data: | |
APPLICATION_HOST: example.com | |
LANG: en_US.UTF-8 | |
PIDFILE: /tmp/server.pid | |
PORT: "3000" |
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
You are writing a spec with type: :request
, i.e. an integration spec instead
of a controller spec. Integration specs are wrappers around Rails'
ActionDispatch::IntegrationTest
class. I usually write controller tests using
this instead of type: :controller
, mainly because it exercises more of the
request and response handling stack. So instead of writing something like
get :index
to start the request, you would write get books_path
or similar.
One of the issues with using type: :request
is that you lose the ability to
jsPDF is a low-level library for building PDF files in JavaScript.
It does not support multiline text.
It does, text accept array, just split with splitTextToSize
Based on: https://gist.github.com/AnalyzePlatypus/c54d520e9bd5b5f662aeb0276e3f01a4
/* | |
To support dynamic type in iOS, we need to set Apple's | |
system font and then define font-families and rem-based | |
font-sizes on descendant elements: | |
*/ | |
@supports (font: -apple-system-body) { | |
html { | |
font: -apple-system-body; | |
} | |
} |
<html> | |
<head> | |
<meta name="mobile-web-app-capable" content="yes" /> | |
<meta name="apple-touch-fullscreen" content="yes" /> | |
<meta name="apple-mobile-web-app-title" content="Expo" /> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="default" /> | |
<link | |
rel="apple-touch-icon" | |
sizes="180x180" |
# config/initializers/redis.rb | |
require 'redis' | |
# Disables the `flushdb` and `flushall` commands. | |
class Redis | |
module DangerousCommands | |
def flushdb | |
raise 'This is EXTREMELY DANGEROUS! If you really want to EMPTY THE ENTIRE DATABASE, do it from `redis-cli`.' | |
# You could call `super` here if you want to allow access in some circumstances. | |
end |