Skip to content

Instantly share code, notes, and snippets.

@didierfranc
didierfranc / Dokku.sh
Last active May 30, 2023 08:20
Get Dokku working with Ubuntu 16.04 LTS
sudo sh -c "
wget -nv -O - https://packagecloud.io/gpg.key | apt-key add -
echo 'deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main' | tee /etc/apt/sources.list.d/dokku.list
apt-get update -qq > /dev/null
apt-get install sigil -t trusty # We're using the Ubuntu 14.04 package ;)
apt-mark hold sigil
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh
bash bootstrap.sh
"
@Bijendra
Bijendra / upload-images-s3-sdk-ruby
Last active May 30, 2023 08:20
Upload images to AWS S3 in rails application using aws-sdk
Using gem aws-sdk for a ror application for uploading images to s3
Uploading images to a fixed bucket with different folders for each object or application.
The s3 keeps a limitation on the number of buckets creattion whereas there is no
limitation for content inside a bucket.
This code will upload image for a user to s3 using aws-sdk gem. The bucket and the image uploaded are made public
so that the images uploaded are directly accessible. The input it takes is the image complete path
where it is present, folder in which it should be uploaded and user_id for whom it should
be uploaded.
@linjunpop
linjunpop / deploy-rails-4-app-with-dokku-on-digital-ocean.md
Last active September 11, 2024 10:21
Deploy Rails 4 app with Dokku on DigitalOcean

Deploy Rails 4 app with Dokku on DigitalOcean

Install dokku

First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel

Then ssh with root account, run this in termianl:

$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash