Skip to content

Instantly share code, notes, and snippets.

View silentsudo's full-sized avatar

Ashish Agre silentsudo

  • Bangalore
View GitHub Profile
@silentsudo
silentsudo / gist:9746fea5a13d7278bff4034d554244bd
Last active April 6, 2025 08:37
gemma3:12b-bootstrap-coder.Modelfile
from gemma3:12b
# set the system message
SYSTEM """
You are a highly experienced and sought-after frontend web designer and developer specializing in Bootstrap (v5.x). You possess deep expertise in responsive design principles, accessibility (WCAG 2.1 AA compliance), clean and maintainable code, and modern web development practices. You are skilled in translating design concepts into functional, visually appealing, and performant web interfaces. Your code will be well-documented and prioritize best practices. You understand the nuances of Bootstrap's grid system, components, utilities, and theming capabilities. You can confidently explain your design choices and provide rationale for your approach. You prioritize code clarity, efficiency, and maintainability. You've worked on a variety of projects, from simple landing pages to complex web applications.
Your Tasks:
You will receive requests involving:
* Design Specifications: These might be in the form of descriptions, mockups (images), sketches, or F
@silentsudo
silentsudo / gist:cec3c6a506b2b1f7aa21d1a6ebc5dfdf
Created December 12, 2024 06:54
ubuntu network file config path
sudo cat /etc/NetworkManager/system-connections/wifi-name.nmconnection
@silentsudo
silentsudo / save-img-to-folder.patch
Last active October 12, 2024 10:13
comfyui save image like automatic1111
index 01ae821..bc0668e 100644
--- a/folder_paths.py
+++ b/folder_paths.py
@@ -4,6 +4,7 @@ import os
import time
import mimetypes
import logging
+import datetime
from typing import Set, List, Dict, Tuple, Literal
from collections.abc import Collection
package in.silentsudo.springintegrations.jms;
import jakarta.jms.ConnectionFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.integration.jms.ChannelPublishingJmsMessageListener;
@silentsudo
silentsudo / produst-search.json
Created January 15, 2023 06:02
should match search as you type
DELETE products
PUT products
{
"mappings": {
"properties": {
"title": {
"type": "search_as_you_type"
}
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
SELECT f.id as feed_id, u.name, u.email,
(select count(*) FROM jpatest.likes where feed_id = f.id) as likes_count,
(select count(*) FROM jpatest.comments where feed_id = f.id) as comments_count
FROM feeds f
LEFT JOIN users u
ON f.user_id = u.id
WHERE u.id = 12055;
SELECT
id,
address,
(6371 *
ACOS(COS(RADIANS(12.972442)) * COS(RADIANS(latitude)) * COS(RADIANS(longitude) -
RADIANS(77.580643)) + SIN(RADIANS(12.972442)) * SIN(RADIANS(latitude)))) AS distance
FROM
address
HAVING distance < 5
ORDER BY distance
SELECT f.id, u.email,
count(distinct l.id) as likes_count,
count(distinct c.id) as comments_count
FROM feeds f
INNER JOIN users u ON f.user_id = u.id
INNER JOIN likes l on l.feed_id = f.id
left join comments c on c.feed_id = f.id
WHERE u.id = 12055
group by f.id order by comments_count asc;
@silentsudo
silentsudo / completable-futures-example.java
Created June 19, 2021 03:45
example showing simple use of completable futures
package examples;
import java.time.Duration;
import java.time.LocalTime;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.function.Supplier;
import java.util.stream.Collectors;