Skip to content

Instantly share code, notes, and snippets.

@rei1406
rei1406 / cpp.json
Created August 18, 2025 12:57
CPP Snippet
{
"Basic C++ Template": {
"prefix": "init",
"body": [
"#include <bits/stdc++.h>",
"",
"using namespace std;",
"",
"int main() {",
" ios_base::sync_with_stdio(false);",
@rei1406
rei1406 / CountryCodes.json
Created October 27, 2022 01:57 — forked from anubhavshrimal/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
import { useEffect, useState } from 'react'
import ua from 'ua-parser-js'
const useMobileDeviceDetection: () => boolean = () => {
const [isMobile, setIsMobile] = useState<boolean>(false)
useEffect(() => {
deviceTypeHandler()
window.addEventListener('resize', () => deviceTypeHandler())
}, [])
const deviceTypeHandler: () => void = () => {
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package utils;
import java.awt.Color;
/**
*
import 'package:flutter/material.dart';
class MyColors {
static const black = Color(0xFF000000);
static const white = Color(0xFFFFFFFF);
static const MaterialColor slate = MaterialColor(
0xFF64748b,
<int, Color>{
50: Color(0xFFf8fafc),
100: Color(0xFFf1f5f9),
const produkListItem = document.querySelectorAll('.produk-list-item')
// product card component selector
const produkCardInformasi = document.querySelectorAll('.produk-card .informasi')
const produkCardImage = document.querySelectorAll('.produk-card .image')
const produkCardOperasiJumlahPembelian = document.querySelectorAll(
'.produk-card .operasi-jumlah-pembelian'
)
const produkCardButton = document.querySelectorAll(
'.produk-card .aksi-pembelian button'
)
import testimoniSiswa from './data.js'
let selectedItemIndex = 0
class TestimonialSiswa extends HTMLElement {
connectedCallback() {
this.render()
this.selectHandler()
this.renderTestimonial()
}
selectHandler() {
const selectItems = this.querySelectorAll('.testimonial-select-item')
@rei1406
rei1406 / app.js
Created September 22, 2021 04:26
const fruit = "apple"
console.log(fruit)