Skip to content

Instantly share code, notes, and snippets.

View themaleem's full-sized avatar
🎯
Focusing

Olumide themaleem

🎯
Focusing
  • Lagos,Nigeria.
View GitHub Profile
@themaleem
themaleem / ror-api.markdown
Created August 28, 2023 01:37 — forked from withoutwax/ror-api.markdown
Guide on how to create an API-Only Application with Ruby on Rails 5

Creating an API-Only Application with Ruby on Rails

01 - Create a new API-only Rails app

rails new ror-app-name --api

02 - Basic Scaffold

01 - Model

This step is for creating a very basic level of model for us to work in. If you know already, or wish to apply your own custom models with relationships you can skip this step.

// int speed = 25;
// System.Console.WriteLine("The car was" + "Travelling at the speed of " + speed + " MPH");
// int age;
// age = 25;
// age++;
// age += 1;
// age--;
// age -= 1;
@themaleem
themaleem / install docker on ubuntu
Last active June 27, 2022 12:44
install docker on ubuntu; shell script
#!/bin/sh
#
# Docker install script
#
# Run this script with Administration priviledges (sudo)
#
echo "------------ Install pre-requisites ---------------------"
# Install packages to allow apt to use a repository over HTTPS:
# for pagination (create a new file)
def get_paginated_list(data, url, start, limit):
count = len(data)
# force numericalize start and limit
start = int(start)
limit = int(limit)
# build json response
### Keybase proof
I hereby claim:
* I am themaleem on github.
* I am maleem (https://keybase.io/maleem) on keybase.
* I have a public key ASBoXluzOrQXZY0jClUBexvHHBY32NjNouzwFnSHa91t2go
To claim this, I am signing this object: