Skip to content

Instantly share code, notes, and snippets.

View eLAmaravati's full-sized avatar

Langit Amaravati eLAmaravati

View GitHub Profile
@eLAmaravati
eLAmaravati / hotel-room.json
Last active October 12, 2025 13:59
Gemini Flash 2.5 Nano banana & Google AI Studio prompt
{
"scene": {
"type": "portrait",
"angle": "top-down",
"location": "softly lit hotel room",
"lighting": {
"style": "warm and soft",
"effect": "gentle shadows enhancing contours of face, arms, and torso",
"mood": "elegant, intimate, quietly alluring"
}
@eLAmaravati
eLAmaravati / coffee-pouch.json
Created October 12, 2025 03:23
Gemini Flash 2.5 Nano banana & Google AI Studio prompt
{
"style": "studio_product_shot",
"image_description": {
"subject": {
"type": "coffee pouch",
"material": "matte kraft paper",
"label": {
"text": "Arabica Blend — Medium Roast\nOrigin: Toraja, Indonesia\nNotes: Chocolate, Citrus, Floral\nNet Weight: 250g",
"font_style": "serif, clean, high contrast",
"placement": "centered on pouch, aligned vertically",
@eLAmaravati
eLAmaravati / catatan.scss
Created December 12, 2023 10:50
Catatan sintaksis SCSS
// Untuk membuat lingkaran yang bolong di tengahnya
.lingkaran-bolong {
width: 100px;
height: 100px;
border-radius: 50%;
background: radial-gradient(circle at center, transparent 40%, #f2f2f2 40%);
}
@eLAmaravati
eLAmaravati / chart-js-plugin.js
Created December 12, 2023 09:38
Plugin Chart Js
/**
* Deskripsi: untuk menambahkan datalabels di atas stacked bar, data yang ditampilkan adalah jumlah data dan jika legend diklik, datalabels akan * berubah sesuai datanya.
* Dependensi: plugin Chart Js Data Labels
*/
const topLabelsPlugin = {
id: 'topLabelsPlugin',
afterDatasetsDraw(chart) {
const { ctx } = chart;
ctx.font = 'bold 12px Poppins';
ctx.fillStyle = 'black';
@eLAmaravati
eLAmaravati / breadcrumbs.php
Created March 1, 2023 00:28
Menambahkan breadcrumbs di GeneratePress (tanpa plugin)
<?php
/*
SHORTCODE UNTUK MEMBUAT BREADCRUMB
Tambahkan di functions.php
Nama shortcode, function, dan class bebas
*/
function breadcrumb_shortcode() {
$output = '<nav aria-label="Breadcrumb" class="breadcrumb">';
$output .= '<a href="'.home_url().'" rel="nofollow">Home</a>';
if ( is_category() || is_single() ){
@eLAmaravati
eLAmaravati / navbar-blogspot.js
Created January 15, 2023 14:14
Navbar Menu Blogspot
document.addEventListener('DOMContentLoaded', function() {
let navbar = document.getElementById('navbarNav');
// Cek elemen yang diawali _ lalu berikan class dropdown-item
for (let a of navbar.querySelectorAll('a')) {
if (a.innerHTML.startsWith('_')) {
a.innerHTML = a.innerHTML.slice(1);
a.parentElement.classList.add('dropdown-item');
}
// Cek elemen yang diakhiri dengan _ lalu berikan class dropdown
// Tambahkan filter ini di child theme functions.php
// Untuk mengubah site title menjadi H1
add_filter( 'generate_site_title_output', function( $output ) {
return sprintf(
'<%1$s class="main-title" itemprop="headline">
<a href="%2$s" rel="home">
%3$s
</a>
</%1$s>',
@eLAmaravati
eLAmaravati / git-clearHistory
Created February 9, 2022 18:33 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@eLAmaravati
eLAmaravati / woocommerce-single-product-functions.php
Created April 19, 2021 13:06 — forked from ohsoren/woocommerce-single-product-functions.php
Reorder the single product page product information
<?php
/**
* woocommerce_single_product_summary hook
*
* @hooked woocommerce_template_single_title - 5
* @hooked woocommerce_template_single_rating - 10
* @hooked woocommerce_template_single_price - 10
* @hooked woocommerce_template_single_excerpt - 20
* @hooked woocommerce_template_single_add_to_cart - 30
* @hooked woocommerce_template_single_meta - 40