Skip to content

Instantly share code, notes, and snippets.

@steamboy
steamboy / gist:75fdd0b7e22303b2d82e091994d5a0ff
Last active September 4, 2025 10:59
Git Cherry Pick Steps

✅ Updated Steps (Cherry-pick Workflow)

1. Switch to the development branch

Make sure you’re on the correct upstream branch:

git checkout -B development --track origin/development

2. Synchronize your local development

Pull the latest changes:

@steamboy
steamboy / carrierwave-base64.md
Created April 16, 2018 10:43 — forked from shrikanthkr/carrierwave-base64.md
Saving base64 string with Carrierwave

In the controller action

image_file = change_img_params(params[:avatar]) #params[:avatar] - base64 string

def change_img_params(img)
begin
  Base64.decode64(img) #To check if thats a base64 string
  if img
    img = file_decode(img.split(',')[1],"some file name") #getting only the string leaving out the data/<format>

end

@steamboy
steamboy / hashes.md
Created March 15, 2018 21:28 — forked from ryansobol/hashes.md
Hashes in Ruby

What's a Hash and why is it important?

A Hash is a collection of key-value pairs. To add, fetch, modify, and delete a value from a Hash, you refer to it with a unique key.

While an Array is indexed by Integers only, a Hash is keyed by any object -- Strings, Integers, etc.

In other programming languages, a Hash might be known as an 'associative array', 'dictionary', or 'HashMap'.

What does a Hash look like?

@steamboy
steamboy / install-comodo-ssl-cert-for-nginx.rst
Created February 19, 2018 01:53 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert