Skip to content

Instantly share code, notes, and snippets.

View dbackeus's full-sized avatar

David Backeus dbackeus

View GitHub Profile
@dbackeus
dbackeus / prompt.md
Created May 14, 2023 08:44
Does DHH think people who prefer static typing are crazy?

Prompt

Would you say that David Heinemeir Hansson in any way insinuates that people who prefer static typing are crazy in the following article?

<content of https://world.hey.com/dhh/programming-types-and-mindsets-5b8490bc>

Reply

No, David Heinemeir Hansson does not insinuate that people who prefer static typing are crazy in this article. He does, however, express his personal preference for dynamic typing, especially within the context of Ruby. He characterizes his past self as an "evangelical" for dynamic typing, possibly implying that he once held a more rigid, dismissive stance toward static typing.

However, a key theme throughout the article is his journey towards recognizing and appreciating the diversity of programming mindsets. He compares programming paradigms to different styles of art, underscoring that the variety of perspectives is what makes programming an exciting, creative endeavor.

[
{ "name": "David", "age": 35 },
{ "name": "Simon", "age": 108 }
]
D, [2019-01-29T09:01:35.568921 #41] DEBUG -- : ETHON: performed EASY effective_url=https://foo:bar@cypress-318260196.eu-west-1.bonsaisearch.net/pressrooms/_doc/4--Pressroom response_code=404 return_code=ok total_time=0.004958
D, [2019-01-29T09:03:05.582615 #41] DEBUG -- : ETHON: performed EASY effective_url=https://foo:bar@cypress-318260196.eu-west-1.bonsaisearch.net/materials/_doc/_delete_by_query response_code=504 return_code=ok total_time=90.004653
rake aborted!
Elasticsearch::Transport::Transport::Errors::GatewayTimeout: [504] {"code":504,"message":"A timeout occured during the request. Please check status.bonsai.io or contact support@bonsai.io for assistance."}
/app/vendor/bundle/ruby/2.5.0/gems/elasticsearch-transport-6.1.0/lib/elasticsearch/transport/transport/base.rb:205:in `__raise_transport_error'
/app/vendor/bundle/ruby/2.5.0/gems/elasticsearch-transport-6.1.0/lib/elasticsearch/transport/transport/base.rb:323:in `perform_request'
/app/vendor/bundle/ruby/2.5.0/gems/elasticsearch-transport-6.1.0/lib
@dbackeus
dbackeus / gist:0351f46b46631bf3d5a7
Last active March 29, 2016 07:45
Rollbar timeout in thread
OpenSSL::SSL::SSLErrorWaitReadable: read would block
+ 32 non-project frames
1 File "/app/vendor/ruby-2.2.3/lib/ruby/2.2.0/openssl/buffering.rb" line 182 in sysread_nonblock
2 File "/app/vendor/ruby-2.2.3/lib/ruby/2.2.0/openssl/buffering.rb" line 182 in read_nonblock
3 File "/app/vendor/ruby-2.2.3/lib/ruby/2.2.0/net/protocol.rb" line 153 in rbuf_fill
4 File "/app/vendor/ruby-2.2.3/lib/ruby/2.2.0/net/protocol.rb" line 134 in readuntil
5 File "/app/vendor/ruby-2.2.3/lib/ruby/2.2.0/net/protocol.rb" line 144 in readline
6 File "/app/vendor/ruby-2.2.3/lib/ruby/2.2.0/net/http/response.rb" line 39 in read_status_line
7 File "/app/vendor/ruby-2.2.3/lib/ruby/2.2.0/net/http/response.rb" line 28 in read_new
8 File "/app/vendor/ruby-2.2.3/lib/ruby/2.2.0/net/http.rb" line 1414 in block in transport_request
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
frontend localnodes
@dbackeus
dbackeus / gist:135951a4840d3f4da3cb
Created May 28, 2015 09:22
Memory leak Article

Using Unicorn-worker-killer

This post will provide some guidance for configuration of unicorn-worker-killer for the Heroku environment.

TL;DR

Use Unicorn Worker Killer

Set memory_limit_max to (memory/worker_threads)*0.8

Template.EditText = UI.Component.extend
kind: "Edit"
init: ->
self = @
@textDep = new Deps.Dependency
@getText = ->
self.textDep.depend()
self.text
@dbackeus
dbackeus / meteor-model.coffee
Created October 13, 2014 08:58
Meteor Model concept
root = global ? window
Function::property = (prop, descriptor) ->
Object.defineProperty this.prototype, prop, descriptor
Function::include = (module) ->
for name, value of module
@prototype[name] = value
Function::extend = (module) ->
@dbackeus
dbackeus / repro-2678.sh
Last active December 25, 2015 22:59
Reproduction script for issue #2678 on bundler/bundler.
#!/bin/bash
set -ex
mkdir -p /tmp/repro-2678
cd /tmp/repro-2678
cat > Gemfile <<EOF
source "http://rubygems.org"
gem 'aws-s3', git: 'git://github.com/streamio/aws-s3.git', require: 'aws/s3'
{
"id": "4d52c7e6e426007ba5000015",
"title": "Fantastic Streamio Video",
"tags": ["Sports", "HD"],
"description": "A text describing the video...",
"aspect_ratio_multiplier": 1.7777777777777777,
"duration": 14.1,
"image_id": null,
"plays": 51,
"state": "pending",