Skip to content

Instantly share code, notes, and snippets.

View jacek213's full-sized avatar

Jacek Grzybowski jacek213

View GitHub Profile
@jacek213
jacek213 / Makefile
Created April 5, 2023 08:41 — forked from hulous/Makefile
Rails app Docker and docker-compose command abstraction
APPLICATION_NAME = app_name
WEB_CONTAINER_NAME = $(APPLICATION_NAME)-web
.DEFAULT_GOAL := help
CONTAINER_APP_MANAGER = docker ## Podman vs Docker
# Docker stuff
attach: ## Attach running web container to see logs
$(CONTAINER_APP_MANAGER) attach $(APPLICATION_NAME)_$(WEB_CONTAINER_NAME)_1
@jacek213
jacek213 / nginx.conf
Created February 4, 2019 08:14 — forked from tompave/nginx.conf
nginx conf for multiple upstreams and different domains
# A commented nginx configuration file for Ruby on Rails
#
# Author: Tommaso Pavese
# tommaso@pavese.me
# http://tommaso.pavese.me
#
# License: http://www.wtfpl.net/
#
#
# Tested with:
@jacek213
jacek213 / clockwork.cap
Created August 6, 2016 15:29 — forked from vjfrancois/clockwork.cap
Clockwork and delayed_job tasks file for capistrano 3
namespace :workers do
namespace :clockwork do
desc "Stop clockwork"
task :stop do
on roles(:app) do
within release_path do
with rails_env: fetch(:rails_env) do
execute :bundle, :exec, :clockworkd, "-c lib/clockwork.rb --pid-dir=#{cw_pid_dir} --log-dir=#{cw_log_dir} stop"
end
end
@jacek213
jacek213 / 0_reuse_code.js
Created June 28, 2016 14:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jacek213
jacek213 / file.rb
Created February 16, 2016 08:38 — forked from zloydadka/file.rb
Write a simple init.d ruby startup script
#!/usr/local/bin/bootup_ruby
# this is /my/daemon/file
require 'rubygems'
require 'daemons'
Daemons.run('main.rb')
#main.rb is the real script