Skip to content

Instantly share code, notes, and snippets.

View letsjump's full-sized avatar

Gianpaolo Scrigna letsjump

View GitHub Profile
@letsjump
letsjump / rubymine_start_with_exec.md
Last active December 29, 2022 14:48
RubyMine start and restart rails server with docker exec

RubyMine start and restart rails server with docker exec

  1. Add a new file stop_rails.sh in the root of your RoR application with this content
#!/bin/sh

rails_pid=$(cat tmp/pids/server.pid)
kill "$rails_pid"
echo "Rails stopped with PID $rails_pid"
@letsjump
letsjump / simple_rails_container.md
Last active November 14, 2022 08:26
A simple Rails application in one Docker container

A simple Rails application in one Docker container

This Gist helps to build and start a simple Rails application in a single Docker container (no docker-compose needed).

  1. Go to your projects folder
cd /home/user/my_projects
  1. Run a temporary ruby:2.x container that will install Rails
@letsjump
letsjump / WorkingDaysHelper.php
Last active February 15, 2021 09:01
PHP Count the number of working days between two dates.
<?php
################################################################
# THIS GIST HAS BEEN ABANDONED IN FAVOUR OF A COMPLETE LIBRARY #
# PLEASE READ THE COMMENT ABOVE #
################################################################
namespace common\components;
/**
@letsjump
letsjump / librelink.sql
Last active March 20, 2023 02:55
Export Librelink android app data to excel (no need to root your phone)