Skip to content

Instantly share code, notes, and snippets.

View frizbee's full-sized avatar
🎯
Focusing

André frizbee

🎯
Focusing
  • Argentina
  • 22:49 (UTC -03:00)
  • LinkedIn in/frizbee
View GitHub Profile
@frizbee
frizbee / ubuntu-20.04.sh
Created July 21, 2020 12:45
Ubuntu Desktop 20.04
#!/bin/bash
# This config file is for desktop version of Ubuntu
# Default settings
start=`date +%s`
bold=$(tput bold)
normal=$(tput sgr0)
red=`tput setaf 1`
green=`tput setaf 2`
@frizbee
frizbee / readme.md
Created June 26, 2021 19:47 — forked from maxivak/readme.md
sitemap.xml for Rails 4 application

Generate sitemap.xml in Rails app

This post shows how to make sitemap.xml for your web site. The sitemap will be accessible by URL http://mysite.com/sitemap.xml

Routes

Myrails::Application.routes.draw do
brew update
brew upgrade
rbenv install -l
# will list all latest ruby versions
# if it will not show all latest versions
# then run:
cd ~/.rbenv/plugins/ruby-build/ && git pull
# list all versions again
@frizbee
frizbee / summernote-with-image-attributes.md
Last active September 20, 2023 09:47
Summernote for Rails 6 using webpacker with Image title and alt attributes

Summernote editor for Rails 6 with webpacker and image attributes

WYSIWYG editor for website is summernote https://summernote.org

Setup

Summernote setup with webapcker, using yarn add command

yarn add [email protected]
@frizbee
frizbee / create_erlang_project.md
Last active July 3, 2024 14:35
Script that will create the folder and file structure for your Erlang application and populate it with the example files

Create simple Erlang project structure

Folder structure

my_server/
├── _build/
├── config/
│   └── sys.config
├── deps/
├── ebin/
├── include/

Starting with Puma 6.0, the --daemon flag has been removed for security reasons. Puma no longer supports daemonizing itself directly. If you need to run Puma in the background as a service, you should use a process manager like systemd, Upstart, or foreman, instead of using --daemon.

Use a Process Manager (systemd)

Instead of using Puma’s built-in daemon mode, you can manage it with a process manager like systemd. Here’s an example of how you can set up Puma with systemd:

Create a systemd service file

Create a file called /etc/systemd/system/puma.service with the following content (replace paths with your specific setup):

[Unit]