Skip to content

Instantly share code, notes, and snippets.

@FikriRNurhidayat
FikriRNurhidayat / INDUSTRIAL_SOCIETY_AND_ITS_FUTURE.md
Created September 26, 2021 12:18
INDUSTRIAL SOCIETY AND ITS FUTURE

INDUSTRIAL SOCIETY AND ITS FUTURE

Introduction

  1. The Industrial Revolution and its consequences have been a disaster for the human race. They have greatly increased the life-expectancy of those of us who live in “advanced” countries, but they have destabilized society, have made life unfulfilling, have subjected human beings to indignities, have led to widespread psychological suffering (in the Third World to physical suffering as well) and have inflicted severe damage on the natural world. The continued
@FikriRNurhidayat
FikriRNurhidayat / Slow-Steam-Download-Speed-Linux.md
Last active May 3, 2024 13:29
Steam Download Speed Issue on Linux
@FikriRNurhidayat
FikriRNurhidayat / Problem.md
Last active May 15, 2021 12:28
Problem implementing Vuetify CSS Helper.

Here's my vuetify.js looks like.

import Vue from 'vue';
import Vuetify from 'vuetify/lib';

Vue.use(Vuetify);

export default new Vuetify({});
// What is promise actually?
/*
Well promise is just like in real life. It's block of code that will be executed, and return rejection or resolve.
You should handle both of them. Like in real life promise, you can't guarantee it will resolve right?
Wait, what is resolve then? Resolve is fulfilled in real life example.
Let's say, you promise me that you'll always be by my side, so the resolve is, you are always be by my side.
And the rejection is, you leave me.
Great, now I know what the promise is, but how do I handle promise resolve and rejection?
It's simple, there's a lot of ways to execute promise. The one I prever to use is, async await.
@FikriRNurhidayat
FikriRNurhidayat / docker-compose.yml
Created September 18, 2019 02:54
Docker Compose for Express Auth
version: "2"
services:
express_auth:
image: fikrirnurhidayat/express-auth:latest
build: .
ports:
- "8080:8080"
network_mode: "host"
environment:
- DB_CONNECTION="mongodb://localhost/express_auth"
@FikriRNurhidayat
FikriRNurhidayat / README.md
Last active September 6, 2019 06:35
GA Batch 4 - Mini Project 2

Mini Project 2

Create e-commerce service.

Functional Requirement

  • There's two roles of user, merchant and customer.
  • Merchants can add product, picture of the product is mandatory.
  • Customers can add a product into their cart, and automatically generate total price of the product they order.
  • Customers can check the order details of each product in their cart.
  • Customers can check their order history.
  • Each product have stock information. And it will be reduced after the order from the user is done.
  • Customers can't order a product which is out of stock.
const mongoose = require('mongoose');
const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
const UserProfile = require('./userProfile.js');
var userSchema = new mongoose.Schema({
name: {
type: 'string',
required: true
},
@FikriRNurhidayat
FikriRNurhidayat / mailer.js
Created September 4, 2019 02:31
Example setup for nodemailer x sendgrid
const nodemailer = require('nodemailer');
const sgTransport = require('nodemailer-sendgrid-transport');
const { successResponse, errorsResponse } = require('./responseFormatter.js');
const option = {
auth: {
api_key: process.env.SENDGRID_API_KEY
}
}
{
"swagger": "2.0",
"info": {
"description": "This is API Documentation.",
"version": "1.0.0",
"title": "Express Auth",
"contact": {
"email": "FikriRNurhidayat@gmail.com"
}
},
#!/usr/bin/env node
/**
* Module dependencies.
*/
var app = require('../src/server.js');
var debug = require('debug')('random:server');
var http = require('http');