Skip to content

Instantly share code, notes, and snippets.

View dimasmds's full-sized avatar
Focusing

Dimas Maulana Dwi Saputra dimasmds

Focusing
View GitHub Profile
@dimasmds
dimasmds / README.md
Created June 9, 2025 02:10
Notes API V2 Documentation (Alternative)

Dicoding Notes API (No Authentication)

API untuk menyimpan catatan publik secara online. Digunakan untuk latihan kelas Dicoding Academy.

Endpoint

https://notes-api.dicoding.dev/v2

Notes

Create Note

@dimasmds
dimasmds / index.js
Created December 2, 2024 07:41
web intermediate code suggestion - 1 (improve initial script load)
import App from './app.js';
document.addEventListener('DOMContentLoaded', async () => {
const content = document.querySelector('#content');
const app = new App({ content });
await app.renderPage();
window.addEventListener('hashchange', async () => {
await app.renderPage();
});
@dimasmds
dimasmds / postman-report-submission-2400363.json
Created October 30, 2023 02:08
postman-report-submission-2400363
{
"id": "1a38f335-4595-4e8c-8df3-e436203efd33",
"name": "Forum API V1 Test",
"timestamp": "2023-10-30T02:05:27.238Z",
"collection_id": "12297972-4b3c62c3-90bf-49ae-8f8c-e7a777a8a35f",
"folder_id": 0,
"environment_id": "12297972-77d6b295-4bef-44dc-be2d-49cf2d97e8c1",
"totalPass": 40,
"totalFail": 8,
"results": [
@dimasmds
dimasmds / FavoriteButton.js
Last active September 20, 2020 12:19
Asynchronous Web Component Test
import FavoriteRestaurantSource from '../../data/favorite-restaurant-source';
class FavoriteButton extends HTMLElement {
connectedCallback() {
this._restaurantData = JSON.parse(this.getAttribute('favorite'));
this.render();
}
async render() {
const { id } = this._restaurantData;
@dimasmds
dimasmds / app.js
Last active September 20, 2020 08:21
Skip Content using Button
import UrlParser from '../routes/url-parser';
import routes from '../routes';
class App {
constructor({ content, skipLink }) {
this._content = content;
this._skipLink = skipLink;
this._initialAppShell();
}
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Scanner;
public class TokoBuku {
@dimasmds
dimasmds / LeaguePresenter
Created March 2, 2019 03:33
Sample GET API with FAN + MVP Pattern
package com.riotfallen.fastandroidnetworkexample.presenter
import android.util.Log
import com.androidnetworking.AndroidNetworking
import com.androidnetworking.common.Priority
import com.androidnetworking.error.ANError
import com.androidnetworking.interfaces.ParsedRequestListener
import com.riotfallen.fastandroidnetworkexample.BuildConfig
import com.riotfallen.fastandroidnetworkexample.model.LeagueResponse
import com.riotfallen.fastandroidnetworkexample.view.LeagueView