I hereby claim:
- I am diraulo on github.
- I am diraulo (https://keybase.io/diraulo) on keybase.
- I have a public key whose fingerprint is E4E9 4446 BA8A 1D83 6B6A 7752 F9EE 2CDC 21D1 9C0E
To claim this, I am signing this object:
require 'rails_helper' | |
RSpec.describe Api::V1::ProductsController, type: :request do | |
describe 'GET#index' do | |
it 'list all products' do | |
# you can add more headers in that hash | |
headers = { | |
'ACCEPT' => 'application/json', | |
'CONTENT_TYPE' => 'application/json', | |
} |
# frozen_string_literal: true | |
require "octokit" | |
require "awesome_print" | |
# Generate a token with delete_repo scope here https://github.com/settings/tokens/new | |
ACCESS_TOKEN = "your_personal_access_token" | |
begin | |
client = Octokit::Client.new(access_token: ACCESS_TOKEN) |
[ | |
{ | |
"name": "about", | |
"version": "1.7.8" | |
}, | |
{ | |
"name": "aligner", | |
"version": "1.2.4" | |
}, | |
{ |
# Example using the net/http module of ruby - Remember to set your api_key in an .env file | |
require 'awesome_print' | |
require 'dotenv/load' | |
require 'json' | |
require 'net/http' | |
require 'pry-byebug' | |
api_key = ENV['OPENWEATHER_API_KEY'] | |
city = 'Pretoria, ZA' |
# ... more configs | |
activate :deploy do |deploy| | |
deploy.deploy_method = :rsync | |
deploy.host = ENV.fetch('DEPLOY_HOST') | |
deploy.path = ENV.fetch('DEPLOY_DIR') | |
deploy.build_before = true | |
deploy.clean = true | |
end |
# ... More configs | |
activate :deploy do |deploy| | |
deploy.deploy_method = :rsync | |
deploy.host = 'user@hostname_or_server_ip' | |
deploy.path = '/path/to/website/root' | |
deploy.build_before = true | |
deploy.clean = true | |
end |
[ | |
{ | |
"name": "Handlebars", | |
"version": "1.5.1" | |
}, | |
{ | |
"name": "about", | |
"version": "1.5.2" | |
}, | |
{ |
I hereby claim:
To claim this, I am signing this object:
Run the following as root
$ dd if=/dev/zero of=/swapfile bs=1M count=[swap_size] # swap_size = 1024 for 1GB
$ chmod -R 0600 /swapfile
$ mkswap /swapfile
$ swapon /swapfile
Add the swap to your fstab
. To do so edit /etc/fstab
and add the following line
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Server Configuration | |
# Set a local private network IP address. | |
# See http://en.wikipedia.org/wiki/Private_network for explanation | |
# You can use the following IP ranges: | |
# 10.0.0.1 - 10.255.255.254 | |
# 172.16.0.1 - 172.31.255.254 |