Skip to content

Instantly share code, notes, and snippets.

View alec-c4's full-sized avatar
🪓
I do make sacrifices to Odin

Alexey Poimtsev alec-c4

🪓
I do make sacrifices to Odin
View GitHub Profile
@davideluque
davideluque / !README.MD
Last active May 3, 2025 21:04
Sign in with Apple in Ruby on Rails using apple_id gem.

Sign in with Apple Implementation for Ruby on Rails

Note: Before diving into this implementation, consider that there are more popular and potentially easier-to-use solutions for implementing Sign in with Apple in Ruby on Rails, such as Omniauth. If you prefer a more out-of-the-box approach, explore those alternatives.

Overview

This implementation of the Sign in with Apple service in Ruby on Rails is suitable for APIs, eliminating the need for views.

Features

@gambala
gambala / Makefile
Last active December 22, 2021 22:26
Makefile for Rails
# https://stackoverflow.com/a/14061796/2237879
#
# This hack allows you to run make commands with any set of arguments.
#
# For example, these lines are the same:
# > make g devise:install
# > bundle exec rails generate devise:install
# And these:
# > make add-migration add_deleted_at_to_users deleted_at:datetime
# > bundle exec rails g migration add_deleted_at_to_users deleted_at:datetime
@jacobgraf
jacobgraf / 01-app.less
Last active December 30, 2021 16:02
Tailwind CSS Base HTML Example
@tailwind base;
@tailwind components;
@import "base";
@import "custom";
@tailwind utilities;
@dixneuf19
dixneuf19 / zsh-virtualenv-setup.md
Last active July 3, 2024 10:42 — forked from hminnovation/zsh-virtualenv-setup.md
Setup python, pip, virtualenv and virtualwrapper, with zsh on a new machine
@koshatul
koshatul / README.md
Last active May 7, 2025 14:29
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
@josephan
josephan / setup_tailwind_in_phoenix.md
Last active May 6, 2025 18:33
Add Tailwind CSS to an Elixir/Phoenix Project with PurgeCSS

Более удобной и актуальной версией является эта статья с использованием traefik

https://gist.github.com/dancheskus/365e9bc49a73908302af19882a86ce52


Certbot и nginx, как обратный прокси в Docker (пример с 2 react проектами)

В результате будет 2 react проекта на 1 сервере доступных по разным ссылкам

@zmts
zmts / A Nuxt.js VPS production deployment.md
Created December 6, 2018 15:19 — forked from DreaMinder/A Nuxt.js VPS production deployment.md
Deployment manual for a real-world project built with nuxt.js + koa + nginx + pm2

Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.

This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger then a landing page.

UPD: This manual now compatible with [email protected]. For older versions deployment, see revision history.


Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:

@julianrubisch
julianrubisch / categories_controller.rb
Last active January 22, 2024 06:44
Dependent Select with StimulusJS
class CategoriesController < ApplicationController
def fields
render json: Field.where(category_id: params[:id]).order(:id)
end
end