Skip to content

Instantly share code, notes, and snippets.

View taqiabdulaziz's full-sized avatar
🏡
Working Remotely

Muhammad Taqi Abdul Aziz taqiabdulaziz

🏡
Working Remotely
  • Jakarta, Indonesia
  • 06:45 (UTC -12:00)
View GitHub Profile
#!/bin/bash
# Run terraform state list command and store output in a variable
TF_STATE_LIST=$(terraform state list)
# Check if the TF_STATE_LIST variable is empty
if [ -z "$TF_STATE_LIST" ]; then
echo "No resources to remove from state."
exit 0
fi
@taqiabdulaziz
taqiabdulaziz / express-wrapper.js
Created July 3, 2019 03:46
Bring your error to client
const logger = require('./logger');
const { httpStatus } = require('../configs/codes');
const { errorResponse } = require('./response');
const wrap = fn => (req, res) => {
const idRequest = req.request_id;
const {
baseUrl,
originalUrl,
method,
@taqiabdulaziz
taqiabdulaziz / react.js
Last active July 3, 2019 16:26
React-draft-wysiwyg
import React, { Component } from 'react';
import logo from './logo.svg';
import { EditorState } from 'draft-js';
import { Editor } from 'react-draft-wysiwyg';
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
import { stateToHTML } from 'draft-js-export-html';
import axios from 'axios'