AWS S3 now uses JSON for CORS configuration and cors.json
is minimal configuration for Rails 7 direct uploads.
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
#!/bin/sh | |
SENTRY_KEY= | |
SENTRY_SECRET= | |
SENTRY_PROJECTID=1 | |
SENTRY_HOST=sentry.example.com | |
SCRIPT_ARGUMENTS=$@ | |
capture_error() | |
{ |
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
# citext pg column format is case insensitive: https://www.postgresql.org/docs/current/citext.html | |
class EnablePostgresExtensions < ActiveRecord::Migration[6.1] | |
def change | |
enable_extension 'citext' | |
end | |
end | |
class CreateFoo < ActiveRecord::Migration[6.1] | |
def change | |
create_table :foos, id: :uuid do |t| |
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
# https://github.com/rbenv/ruby-build/discussions/2245#discussioncomment-7022979 | |
export LDFLAGS="-L/opt/brew/Cellar/[email protected]/1.1.1v/lib" | |
export CPPFLAGS="-I/opt/brew/Cellar/[email protected]/1.1.1v/include" | |
export PKG_CONFIG_PATH="/opt/brew/Cellar/[email protected]/1.1.1v/lib/pkgconfig" | |
ruby-install ruby 3.1.2 | |
# $ sysctl -n machdep.cpu.brand_string | |
# > Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz |
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
# Kaleidoscope.app as difftool and mergetool. | |
[difftool "Kaleidoscope"] | |
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\" | |
[diff] | |
tool = Kaleidoscope | |
[difftool] | |
prompt = false | |
[mergetool "Kaleidoscope"] | |
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot | |
trustExitCode = true |
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
if [ ! -f .env ] | |
then | |
export $(cat .env | xargs) | |
fi |
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
str = "Czech Republic,CZK,139,000.00" | |
str.gsub(/[^\d\.,]/, '').gsub(/^,+/,'') | |
# => "139,000.00" |
Install puma-dev as described in the official documentation
brew install puma/puma/puma-dev
# Configure some DNS settings that have to be done as root
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
# via https://stackoverflow.com/questions/43519292/load-file-from-local-gem-in-irb#46941281 | |
# | |
# If you want to require a local file or gem in irb, I like this method: | |
# | |
# irb -I lib -r usps_countries | |
# This allows you to then require the module in your new irb instance: | |
# | |
# require 'usps_countries' | |
# Options used: | |
# |
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
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options | |
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full. | |
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}… | |
Getting help: | |
-h — print basic options | |
-h long — print more options | |
-h full — print all options (including all format and codec specific options, very long) |
NewerOlder