Skip to content

Instantly share code, notes, and snippets.

View jacek213's full-sized avatar

Jacek Grzybowski jacek213

View GitHub Profile
@ahmadhasankhan
ahmadhasankhan / rails-server-setup.md
Last active December 15, 2020 21:22
Install and Setup Nginx+Puma+PostgresSQL on Ubuntu-18

Install and Setup Nginx+Puma+PostgresSQL on Ubuntu-18

Create Deploy User:

  From the root user 
  $ adduser deploy
  $ adduser deploy sudo
  $ exit
@trev
trev / config.yml
Created May 25, 2018 01:23
CircleCI 2.0 with parallelism & simplecov for Rails
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
defaults: &defaults
working_directory: ~/split_app
parallelism: 2
docker:
- image: circleci/ruby:2.5.0-node-browsers
@noniq
noniq / capistrano_rsync.rb
Created August 30, 2017 16:46
Simple plugin for Capistrano 3.7+ to deploy via rsync
require 'capistrano/scm/plugin'
class Capistrano::SCM
# Usage: Add this to your `Capfile`:
#
# require_relative "lib/capistrano_rsync" # adapt path as needed
# install_plugin Capistrano::SCM::Rsync
#
# Note that this you need to deactivate any other SCM plugins (there can only be one SCM plugin active at any time)-
#
@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active March 7, 2024 15:50
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@briankung
briankung / docker-pry-rails.md
Last active December 12, 2023 10:40
Using pry-rails with Docker

First, add pry-rails to your Gemfile:
https://github.com/rweng/pry-rails

gem 'pry-rails', group: :development

Then you'll want to rebuild your Docker container to install the gems

@jazzido
jazzido / graphql.rb
Last active July 3, 2021 06:36
Neo4J + GraphQL — Toy example using graphql-ruby and neo4jrb
require 'graphql'
require 'neo4j'
neo4j_url = ENV['NEO4J_URL'] || 'http://localhost:7474'
session = Neo4j::Session.open(:server_db, neo4j_url)
class Author
include Neo4j::ActiveNode
id_property :id_author
@daicham
daicham / .gitlab-ci.yml
Last active May 3, 2023 07:05
A sample of .gitlab-ci.yml for a gradle project
image: java:8-jdk
stages:
- build
- test
- deploy
before_script:
# - echo `pwd` # debug
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
@maxivak
maxivak / 00.md
Last active June 15, 2023 21:28
Sending emails with ActionMailer and Sidekiq

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.

ActionMailer

Create your mailer us usual:

@tompave
tompave / nginx.conf
Last active August 15, 2022 10:18
commented nginx.conf for Ruby on Rails
# 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:
@akdetrick
akdetrick / rvm-to-rbenv.md
Last active March 15, 2024 17:06
Guide to switching to rbenv bliss from RVM hell

RVM to rbenv

Why? @sstephenson explains it best here.


1) remove RVM from your system

This should get rid of the rvm dir and any installed rubies:

$ rvm implode