This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch(href, { | |
headers: { | |
Accept: "text/vnd.turbo-stream.html", | |
}, | |
}) | |
.then(r => r.text()) | |
.then(html => Turbo.renderStreamMessage(html)) | |
// optionally reflect the url .then(_ => history.replaceState(history.state, "", href)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install openssl using homebrew | |
brew install openssl | |
gem install --user-install jekyll -- --with-openssl-dir=/opt/homebrew/opt/openssl@1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is not supported in graphql after 1.12.11: | |
argument :starts_at, GraphQL::Types::ISO8601DateTime, required, : false, default_value: "" | |
it raises this error: | |
# ArgumentError: | |
# no time information in "" | |
# /Users/jorge/.rvm/gems/ruby-3.0.2/gems/graphql-1.13.0/lib/graphql/types/iso_8601_date_time.rb:42:in `coerce_result' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body data-controller="outer"> | |
... | |
<!-- Some newly inserted targets: --> | |
<div data-target="outer.thing" data-controller="inner">1...</div> | |
<div data-target="outer.thing" data-controller="inner">2...</div> | |
</body> | |
Each target has its own inner controller, which emits an inner-connected event when connected: | |
// inner_controller.js | |
export default class extends Controller { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install openssl readline | |
# edit .zshrc | |
# Setup Compiler paths for readline and openssl | |
local READLINE_PATH=$(brew --prefix readline) | |
local OPENSSL_PATH=$(brew --prefix openssl) | |
export LDFLAGS="-L$READLINE_PATH/lib -L$OPENSSL_PATH/lib" | |
export CPPFLAGS="-I$READLINE_PATH/include -I$OPENSSL_PATH/include" | |
export PKG_CONFIG_PATH="$READLINE_PATH/lib/pkgconfig:$OPENSSL_PATH/lib/pkgconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install zstd | |
brew install openssl | |
brew install mysql | |
# Double check that paths for openssl and zstd are valid. | |
gem install mysql2 -v '0.5.4' -- --with-mysql-config=$(brew --prefix mysql)/bin/mysql_config --with-ldflags="-L$(brew --prefix zstd)/lib -L$(brew --prefix openssl)/lib" --with-cppflags=-I$(brew --prefix openssl)/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
certbot --authenticator standalone --installer nginx -d domain-name.com --pre-hook "service nginx stop" --post-hook "service nginx start" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#development/sandbox | |
openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert pushcertsandbox.pem -key pushkeysandbox.pem | |
#production | |
openssl s_client -connect gateway.push.apple.com:2195 -cert pushcertproduction.pem -key pushkeyproduction.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'.source.ruby': | |
'Require pry': | |
'prefix': 'pry' | |
'body': "require 'pry'\;binding.pry" | |
'Require byebug': | |
'prefix': 'byebug' | |
'body': "require 'byebug'\; binding.byebug" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s -w \%{size_header} -o /dev/null http://website.com | |
curl -I http://website.com |
NewerOlder