In programming languages, literals are textual representations of values in the source code. This is a syntactical concept.
Some examples:
7 # integer literal
In programming languages, literals are textual representations of values in the source code. This is a syntactical concept.
Some examples:
7 # integer literal
Rails.application.configure do | |
# Add Cloudflare's IPs to the trusted proxy list so they are ignored when | |
# determining the true client IP. | |
# | |
# See https://www.cloudflare.com/ips-v4/ and https://www.cloudflare.com/ips-v6/ | |
config.action_dispatch.trusted_proxies = ActionDispatch::RemoteIp::TRUSTED_PROXIES + %w[ | |
173.245.48.0/20 | |
103.21.244.0/22 | |
103.22.200.0/22 | |
103.31.4.0/22 |
# Set HONEYBADGER_FOO_BAR_JOB=asdf where asdf is the check in value Honeybadger gives you. | |
class ApplicationJob < ActiveJob::Base | |
after_perform { |job| job.honeybadger_checkin } | |
# Check in with Honeybadger to let us know that the job was performed | |
# if there is an identifier configured for the job. | |
def honeybadger_checkin | |
identifier = honeybadger_checkin_identifier | |
return unless identifier.present? |
require "benchmark/ips" | |
require "benchmark/memory" | |
require 'bundler' | |
class Bundler::Settings | |
def original(name) | |
key = key_for(name) | |
value = configs.values.map {|config| config[key] }.compact.first | |
converted_value(value, name) |
import Foundation | |
enum Environment: String { | |
case development, staging, production | |
} | |
extension Environment { | |
static var current: Environment { | |
if isAppStore { | |
return .production |
For years, people have been using jemalloc with ruby. There were various benchmarks and discussions. Legend had it that Jemalloc 5 didn't work as well as Jemalloc 3.
Then, one day, hope appeared on the horizon. @wjordan offered a config for Jemalloc 5.
FROM ruby:3.1.2-bullseye
RUN apt-get update ; \
class Module | |
def sigilize(method_name) | |
define_method("#{method_name}?") do |*args, **kwargs| | |
!!method_name(*args, **kwargs) | |
end | |
define_method("#{method_name}!") do |*args, **kwargs| | |
result = method_name(*args, **kwargs) | |
raise StandardError unless result | |
result |
module AttributeMemoization | |
def attr_accessor(*names, &block) | |
return super(*names) unless block_given? | |
attr_reader(*names, &block) | |
attr_writer(*names) | |
end | |
def attr_reader(*names, &block) | |
return super(*names) unless block_given? |
If we run a 1-year Full-Stack Development program, what artifacts would we want students to exit with? What would hiring managers want to see? What will make our graduates stand out?
We should contact employer partners to ask them what they'd like to see, especially ones like who have strong apprenticeship/in-house training programs in place. E.g., thoughtbot.
Once we figure out the artifacts that would best demonstrate valuable skills/make candidates attractive, we should create a dream personal website/portfolio to act as a target for students, including stretch goals. We can then backward design the curriculum from there.
```mermaid
sequenceDiagram
participant dotcom
participant iframe
participant viewscreen
dotcom->>iframe: loads html w/ iframe url
iframe->>viewscreen: request template
viewscreen->>iframe: html & javascript
iframe->>dotcom: iframe ready