Skip to content

Instantly share code, notes, and snippets.

View DonzTea's full-sized avatar
💻

Doni Rahma Tiana DonzTea

💻
  • Bandung, Indonesia
View GitHub Profile
@DonzTea
DonzTea / mac-apple-chip-ruby-install.txt
Last active October 8, 2023 07:41
Install Ruby as Cocoapods compatible for Mac with Apple chip (React Native / Flutter dependency)
brew install rbenv ruby-build
rbenv install 2.7.6 && rbenv global 2.7.6
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
source ~/.zshrc
rm -rf /usr/local/bin/bundle
<head>
<title>Title</title>
<!-- Title -->
<meta property="og:title" content="Title" />
<meta name="twitter:title" content="title_on_twitter" />
<!-- Description -->
<meta name="description" content="description" />
<meta property="og:description" content="description" />
@DonzTea
DonzTea / axios-interceptors.ts
Last active September 12, 2022 06:15
axios interceptors example
import client from 'axios';
const axios = client.create({
headers: {
Accept: 'application/json',
'Content-Type': 'application/json; charset=utf-8',
},
});
export default axios;
@DonzTea
DonzTea / redux.js
Created May 31, 2022 12:01
plain redux
const redux = require('redux');
// * declaring initial state
const initialState = {
counter: 0,
};
// * reducer
const rootReducer = (state = initialState, action) => {
if (action.type === 'INC_COUNTER') {