Skip to content

Instantly share code, notes, and snippets.

View awesome's full-sized avatar

So Awesome Man awesome

View GitHub Profile
awesome / raven-shell
Created November 9, 2023 18:36 — forked from barroco/raven-shell
Send Sentry error from shell using curl
View raven-shell
awesome / 20210313000000_create_foos.rb
Created October 17, 2023 17:54
`citext` pg column format is case insensitive: for ruby on rails migration
View 20210313000000_create_foos.rb
# citext pg column format is case insensitive:
class EnablePostgresExtensions < ActiveRecord::Migration[6.1]
def change
enable_extension 'citext'
class CreateFoo < ActiveRecord::Migration[6.1]
def change
create_table :foos, id: :uuid do |t|
awesome /
Created September 29, 2023 20:25
ruby-install ruby 3.1.2 FAILED? → FIX 🏥🔧🛠️ ( macOS Sonoma 14.0 / Intel Core i7)
export LDFLAGS="-L/opt/brew/Cellar/openssl@1.1/1.1.1v/lib"
export CPPFLAGS="-I/opt/brew/Cellar/openssl@1.1/1.1.1v/include"
export PKG_CONFIG_PATH="/opt/brew/Cellar/openssl@1.1/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
awesome / .gitconfig
Created February 23, 2023 00:06 — forked from joelpittet/.gitconfig
kaleidoscope git mergetool config
View .gitconfig
# as difftool and mergetool.
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
tool = Kaleidoscope
prompt = false
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true
awesome /
Created January 13, 2023 22:36 — forked from basti/
AWS S3 CORS configuration for Rails ActiveStorage

AWS S3 now uses JSON for CORS configuration and cors.json is minimal configuration for Rails 7 direct uploads.

awesome /
Created January 13, 2023 20:30 — forked from mihow/
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
export $(cat .env | xargs)
awesome / gsub-string-parse-number-with-comma-and-decimal.rb
Created December 5, 2022 23:52
View gsub-string-parse-number-with-comma-and-decimal.rb
str = "Czech Republic,CZK,139,000.00"
str.gsub(/[^\d\.,]/, '').gsub(/^,+/,'')
# => "139,000.00"
awesome / guide: use puma-dev as
Created October 26, 2022 18:32 — forked from rcugut/guide: use puma-dev as
guide: use puma-dev as proxy
View guide: use puma-dev as
View ruby-require-a-local-file-or-gem-in-irb.rb
# via
# 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:
awesome / gist:b592620313d4ff8712800b40d1e1511b
Created September 15, 2022 19:17 — forked from tayvano/gist:6e2d456a9897f55025e25035478a3a50
complete list of ffmpeg flags / commands
View gist:b592620313d4ff8712800b40d1e1511b
Originall From: Posted 2015-05-29
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)