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 / History|-15bd721e|entries.json
Last active April 10, 2022 18:16
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/jacekgrzybowski/workspace/leaflogix/components-lib/src/components/DutchieTable/Table.tsx","entries":[{"id":"wRGn.tsx","source":"Fix all ESLint auto-fixable problems","timestamp":1649350478188},{"id":"QYNR.tsx","source":"Fix all ESLint auto-fixable problems","timestamp":1649350504467},{"id":"uy0A.tsx","timestamp":1649350740149},{"id":"b8pX.tsx","source":"undoRedo.source","timestamp":1649350838686},{"id":"Xueq.tsx","timestamp":1649350968932},{"id":"irkr.tsx","timestamp":1649351022549},{"id":"5XEc.tsx","source":"Fix all ESLint auto-fixable problems","timestamp":1649351081971},{"id":"0RCw.tsx","source":"undoRedo.source","timestamp":1649352265955}]}
rm -rf ./tmp/db
docker-compose rm -f
docker-compose down
docker-compose build --no-cache
docker-compose run web rake db:create db:migrate db:seed
docker-compose up
@jacek213
jacek213 / sidekiq_stuck_log.log
Created September 24, 2020 14:38
sidekiq_stuck_log.log
2020-09-24T13:41:24.358Z 9675 TID-oumsvzlhv WlsGenericLeadsWorker JID-93236485aa205424a6bed0ff INFO: start
2020-09-24T13:49:10.199Z 9675 TID-oumsvzlpf WlsGenericLeadsWorker JID-16788daa411eaa756088af40 INFO: start
2020-09-24T13:52:10.460Z 9675 TID-oumsvzj33 WlsGenericLeadsWorker JID-c854c8e9c711c8b4dac83375 INFO: start
2020-09-24T13:53:07.124Z 9675 TID-oumsvzl8j WlsGenericLeadsWorker JID-56070394688d756a27547885 INFO: start
2020-09-24T13:55:27.285Z 9675 TID-oumwvl8b7 WARN: Thread TID-oumwvl8b7
2020-09-24T13:55:27.285Z 9675 TID-oumwvl8b7 WARN: /home/deploy/myapp/shared/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/cli.rb:164:in `backtrace'
/home/deploy/myapp/shared/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/cli.rb:164:in `block (2 levels) in <class:CLI>'
/home/deploy/myapp/shared/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/cli.rb:161:in `each'
/home/deploy/myapp/shared/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/cli.rb:161:in `block in <class:CLI>'
/home/deploy/myapp/shared/bundle/ruby/2.6.0
{"manage_listing_listing_detail":{"id":40232336,"amenity_categories":[],"name":"","summary":"","street":"Miedziana 22","city":"Warszawa","state":"mazowieckie","country_code":"PL","zipcode":"00-809","lat":52.230576,"lng":20.989931,"bedrooms":0,"beds":1,"bathrooms":1.5,"room_type":"Całe miejsce","room_type_category":"entire_home","person_capacity":2,"property_type_id":1,"tier_id":0,"directions":"","user_defined_location":false,"is_location_exact":true,"list_your_space_last_finished_step_id":"BATHROOMS","property_type_group":"apartments","apt":"","has_ever_been_available":false,"user_id":10381567,"facebook_connected":true,"display_exact_location_to_guest":false,"has_availability":false,"visibility":"world","show_all_visibility_options":false,"listing_category_values":[{"category_type":"residence_type"},{"category_type":"host_interaction"},{"category_type":"size_of_building"},{"category_type":"category_listing_type","category_value":"listing_category_type_home"},{"category_type":"keep_personal_belonging","categor
@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:
upstream node_app_main {
server localhost:8080;
}
server {
listen 80;
server_name od-reki.volkswagen.pl;
root /home/deploy/main-node/current/public;
export do
field :car_name, :string do
export_value do
bindings[:object]&.car_model&.car_name&.name
end
end
end
@jacek213
jacek213 / deploy.sh
Created June 29, 2018 14:31
node app deploy script
#!/bin/bash
set -e
set -o pipefail
########### USER CONFIGURABLE OPTS ################
REMOTE_ADDR=example.com
GIT_REMOTE=git@git.example.com:example/app.git
CACHE_DIR=tmp/.cache
###################################################