Skip to content

Instantly share code, notes, and snippets.

View apsolut's full-sized avatar
🎯
Focusing

Aleksandar Perisic apsolut

🎯
Focusing
View GitHub Profile
@apsolut
apsolut / x.user.js
Created December 12, 2025 13:28 — forked from sorah/x.user.js
// ==UserScript==
// @name correct aws what's new article page <title>
// @description correct
// @namespace http://tampermonkey.net/
// @version 2025-08-07
// @author sorah.jp
// @match https://aws.amazon.com/about-aws/whats-new/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.com
// @grant none
// ==/UserScript==
@apsolut
apsolut / a.md
Created December 12, 2025 13:28 — forked from sorah/a.md
reinvent25-rainfocus-calendar-more-data.user.js

user script for re:Invent 2025 event portal to improve its calendar by:

  • show code, type and venue on the calendar directly
  • highlight sessions where isn't a breakout session and you have no reserved seat

Confirmed working with Tampermonkey.

before

@apsolut
apsolut / acf-on-cpt-archive.php
Last active October 29, 2025 00:08
acf-on-cpt-page
<?php
/* Add ACF Options Page */
if( function_exists('acf_add_options_page') ) {
/*
$page = acf_add_options_page(array(
'page_title' => 'Applications',
@apsolut
apsolut / exclude-things-pre-get-posts.php
Last active October 29, 2025 00:07
exclude things in wordpress
<?php
/**
* https://www.wpbeginner.com/plugins/how-to-exclude-specific-pages-authors-and-more-from-wordpress-search/
*/
add_action( 'pre_get_posts', 'exclude_things_from_query_bojan', 9999 );
function exclude_things_from_query_bojan( $query ) {
if ( !is_admin() && $query->is_main_query() ) {
@apsolut
apsolut / unset-image-sizes-intermediate-image-filter.php
Last active October 29, 2025 00:06
Unset WordPress image sizes
<?php
/**
* @Llink https://perishablepress.com/disable-wordpress-generated-images/
* @link https://developer.wordpress.org/reference/hooks/intermediate_image_sizes_advanced/
* @link https://hookr.io/4.9/filters/image_size_names_choose/
*/
/*---------- Register hooks in order of execution ----------*/
add_filter( 'intermediate_image_sizes_advanced', 'decomtheme_images_remover', 10, 1 );
@apsolut
apsolut / wrap-elements.js
Created January 8, 2021 23:26
VJ wrap elements vanilla javascript
function wrap(top, selector, bottom){
var matches = document.querySelectorAll(selector);
for (var i = 0; i < matches.length; i++){
var modified = top + matches[i].outerHTML + bottom;
matches[i].outerHTML = modified;
}
}
wrap("<div class='wrapper'>", ".caption-services-apps-ext-WordPress", "</div>");
@apsolut
apsolut / security-checklist.md
Created April 12, 2025 17:29 — forked from mattppal/security-checklist.md
A simple security checklist for your vibe coded apps

Frontend Security

Security Measure Description
Use HTTPS everywhere Prevents basic eavesdropping and man-in-the-middle attacks
Input validation and sanitization Prevents XSS attacks by validating all user inputs
Don't store sensitive data in the browser No secrets in localStorage or client-side code
CSRF protection Implement anti-CSRF tokens for forms and state-changing requests
Never expose API keys in frontend API credentials should always remain server-side
@apsolut
apsolut / Category.html
Created December 17, 2024 13:31 — forked from moderatorwes/Category.html
Zendesk: Accordions for Copenhagen theme - Live example(https://zenultra.zendesk.com/)
<!-- Add this code if you would like accordions on your Category Page -->
<div class="container-divider"></div>
<div class="container">
<nav class="sub-nav">
{{breadcrumbs}}
{{search submit=false}}
</nav>
@apsolut
apsolut / ios14.js
Created December 5, 2024 20:50
ios14 less than 1%
<script>
const uaIOS14 = navigator.userAgent;
if (
/iPhone/.test(uaIOS14) &&
/OS 14_/.test(uaIOS14) && // Specifically checks for iOS 14.x
!/OS 14_/.test(uaIOS14) // Excludes iOS 15+ and newer
) {
console.log('iOS 14');
document.querySelector('#hs-banner-parent #hs-eu-cookie-confirmation')
$(document).ready(function(){
$(".content").hide();
$(".content").slice(0, 8).show();
$("#loadMore").on("click", function(e){
e.preventDefault();
$(".content:hidden").slice(0, 3).slideDown();
if($(".content:hidden").length == 0) {
$("#loadMore").hide();
$(".completed").show();
}