This file contains hidden or 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
#!/usr/bin/env node | |
import esbuild from "esbuild" | |
import chokidar from "chokidar" | |
import http from "http" | |
const watchDirectories = [ | |
"./app/assets/builds/*", | |
"./app/views/**/*.erb", | |
] |
This file contains hidden or 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
ARG RUBY_VERSION=3.1.2 | |
FROM ruby:$RUBY_VERSION-bullseye as builder | |
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 \ | |
LANG=C.UTF-8 \ | |
BUNDLE_RETRY=3 \ | |
BUNDLE_PATH=/gems | |
ARG RAILS_ENV=production | |
ENV RAILS_ENV $RAILS_ENV | |
# This is needed during the build process because when precompiling assets, the |
This file contains hidden or 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
require 'json' | |
pipeline = "PIPELINE_UUID" | |
pipeline_owner = "enterprise_team_name or email_address" | |
name = "heroku_app_name" | |
# CREATE APP | |
`heroku apps:create #{name} --team=#{pipeline_owner} --region=eu` # using eu region, otherwise it defaults to us | |
info_output = `heroku apps:info #{name} --json` | |
app_info = JSON.parse(info_output) |
This file contains hidden or 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
:logger.debug(""" | |
> `docker attach $(docker compose ps web -q)` to attach IEx.pry() | |
> Ctrl + P + Q to detach from the container terminal | |
""") |
This file contains hidden or 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
# All other config | |
# Usage | |
# $ git:(main) new-task "Setup dockerfile for development" | |
# $ git:(tim.mccarthy/setup-dockerfile-for-development) | |
alias gcom="checkout-main" | |
function checkout-main() { | |
main_branch=$(main-branch) |
This file contains hidden or 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
defmodule Helpers do | |
def copy(term) do | |
text = | |
if is_binary(term) do | |
term | |
else | |
inspect(term, limit: :infinity, pretty: true) | |
end | |
port = Port.open({:spawn, "pbcopy"}, []) |
OlderNewer