Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Siku Chrissiku

View GitHub Profile
@Chrissiku
Chrissiku / example_one.js
Last active June 6, 2022 10:13
Is It DRY ?
View example_one.js
const pets = ['Cat', 'Dog', 'Bird', 'Fish', 'Frog', 'Hamster', 'Pig', 'Horse', 'Lion', 'Dragon'];
// Print all pets
console.log(pets[0]);
console.log(pets[1]);
console.log(pets[2]);
console.log(pets[3]);
.cat {
font-family: "Times New Roman", Times, serif;
font-size: 1rem;
View rails-api.md

Ruby on Rails API only app | Postgres

01 - Create a new API-only Rails app and setup postgres database

rails new my-app --api --database=postgresql -T

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.