Skip to content

Instantly share code, notes, and snippets.

View yigitbacakoglu's full-sized avatar
©️
:trollface:

Yigit C. Bacakoglu yigitbacakoglu

©️
:trollface:
View GitHub Profile
@yigitbacakoglu
yigitbacakoglu / 1 Setup vps.md
Created January 12, 2021 21:32 — forked from deHelden/"torn" 1 Setup vps.md
Deploy Rails 6.0.0 to VPS(DigitalOcean Ubuntu 19). Nginx, Puma, Capistrano3, PostgreSQL, Rbenv.

SETUP VPS

based on DigitalOcean guide

Create local project

local$ rails new appname -T -d postgresql
local$ rails g scaffold Story title:string body:text
local$ rails db:migrate

install nodejs

sudo apt-get update
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs yarn
@yigitbacakoglu
yigitbacakoglu / serializer_benchmarks.rb
Created April 26, 2017 07:14 — forked from aishfenton/serializer_benchmarks.rb
Performance comparison of different ruby serializer methods
# sudo gem install bson
# sudo gem install bson_ext
# sudo gem install yajl-ruby
# sudo gem install json
# sudo gem install msgpack
require 'rubygems'
require 'benchmark'
require 'yaml'
require 'bson'
@yigitbacakoglu
yigitbacakoglu / README.md
Created December 21, 2016 21:29 — forked from oodavid/README.md
Backup MySQL to Amazon S3

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc

@yigitbacakoglu
yigitbacakoglu / bin.json
Created November 7, 2016 11:26 — forked from mstfsnc/bin.json
banka bin numaraları
[
{
"banka_adi": "T.C.Z\u0130RAAT BANKASI A.\u015e.",
"marka": "maximum",
"kredi_karti": {
"master_card": [
"540134",
"547287",
"542374",
"540130",
@yigitbacakoglu
yigitbacakoglu / faye.rb
Last active January 26, 2016 20:05 — forked from tmcallister/faye.rb
FAYE_TOKEN = 'secretToken'
if defined? Rails
if Rails.env == 'development'
FAYE_URI = "http://#{APP_CONFIG[:nameremoved_service][:host]}:9292/faye"
else
FAYE_URI = "https://#{APP_CONFIG[:nameremoved_service][:host]}/faye"
end

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh [email protected]

Add ssh fingerprint and enter password provided in email