Skip to content

Instantly share code, notes, and snippets.

View ThomasBush's full-sized avatar

Thomas Bush ThomasBush

  • HexArmor
  • Atlanta, Georgia
View GitHub Profile
@ThomasBush
ThomasBush / youtube-video-commands
Last active February 11, 2024 03:21
Ubuntu 20.04 Focal Fossa Rails server setup
# Generate Random Passwords
curl 'https://www.random.org/passwords/?num=2&len=24&format=plain&rnd=new'
# Create deploy user
sudo adduser deploy
sudo adduser deploy sudo
su deploy
cd ../deploy/
# Generate ssh keys 
# /app/views/spina/admin/structure_partables/icons/_form.html.haml
.horizontal-form-label
= f.object.title
.horizontal-form-content
= f.fields_for :page_partable, f.object.page_partable do |ff|
= ff.text_field :content, class: 'icon-picker', value: 'fa-anchor'
@ThomasBush
ThomasBush / product.rb
Created May 1, 2015 12:57
Algolia Index question
algoliasearch index_name: "products" do
# currently working
attribute :id, :product_number, :name, :family_id, :slug, :collection_id, :benefits, :categories
# refined indices I would like to have
attribute :id, :product_number, :name, :family_id, :slug, :collection_id
attribute :benefits do
{ id: benefits.id, name: benefits.name }
end
attribute :categories do
@ThomasBush
ThomasBush / Capfile
Last active August 29, 2015 13:57 — forked from atkolkma/Capfile
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
# require 'capistrano/rails'
# Includes tasks from other gems included in your Gemfile
#