Skip to content

Instantly share code, notes, and snippets.

View PH4NTOMiki's full-sized avatar
💭
Programming

Mihael Mutić PH4NTOMiki

💭
Programming
View GitHub Profile
@PH4NTOMiki
PH4NTOMiki / force-shortcodes-setting.js
Created June 26, 2024 12:05 — forked from frzsombor/force-shortcodes-setting.js
Fix WordPress Shortcodes in Query Loop Post Templates
/**
* Add "Force Shortcodes" setting to specific blocks
* by @frzsombor - 2024
*/
(function() {
/* Basic config */
const attributeNS = 'frzsombor/force-shortcodes'; // Namespace for JS filters
const attributeName = 'forceShortcodes'; // camelCasedName for storing data
@frzsombor
frzsombor / force-shortcodes-setting.js
Last active September 28, 2024 15:49
Fix WordPress Shortcodes in Query Loop Post Templates
/**
* Add "Force Shortcodes" setting to specific blocks
* by @frzsombor - 2024
*/
(function() {
/* Basic config */
const attributeNS = 'frzsombor/force-shortcodes'; // Namespace for JS filters
const attributeName = 'forceShortcodes'; // camelCasedName for storing data
@PH4NTOMiki
PH4NTOMiki / README.md
Created January 13, 2022 14:20 — forked from giabao/README.md
bitwarden deduplicate import
  1. (optional) Import Data from chrome, firefox, keepass,..
  2. Export Vault to bitwarden.json file
  3. Get Ammonite
sudo sh -c '(echo "#!/usr/bin/env sh" && curl -L https://github.com/com-lihaoyi/Ammonite/releases/download/2.4.0/2.13-2.4.0) > /usr/local/bin/amm && chmod +x /usr/local/bin/amm' && amm
  1. Download the dedup.scala file below then run it in ammonite
amm dedup.scala bitwarden.json
@giabao
giabao / README.md
Last active March 29, 2025 16:52
bitwarden deduplicate import
  1. (optional) Import Data from chrome, firefox, keepass,..
  2. Export Vault to bitwarden.json file
  3. Get Ammonite
sudo sh -c '(echo "#!/usr/bin/env sh" && curl -L https://github.com/com-lihaoyi/Ammonite/releases/download/2.4.0/2.13-2.4.0) > /usr/local/bin/amm && chmod +x /usr/local/bin/amm' && amm
  1. Download the dedup.scala file below then run it in ammonite
amm dedup.scala bitwarden.json
@maxkostinevich
maxkostinevich / index.html
Last active June 28, 2025 15:51
Cloudflare Worker - Handle Contact Form
<!--
/*
* Serverless contact form handler for Cloudflare Workers.
* Emails are sent via Mailgun.
*
* Learn more at https://maxkostinevich.com/blog/serverless-contact-form
* Live demo: https://codesandbox.io/s/serverless-contact-form-example-x0neb
*
* (c) Max Kostinevich / https://maxkostinevich.com
*/
@mehulmpt
mehulmpt / index.js
Last active April 22, 2022 13:14
Slow Loris attack using Node
const net = require('net')
const opts = {
host: 'localhost',
port: 1234,
sockets: 2000,
respawn: false,
rate: 600,
method: 'GET',
path: '/'
@bietkul
bietkul / next.config.js
Last active January 15, 2022 13:08
Custom Next.js Config
if (typeof require !== 'undefined') {
require.extensions['.css'] = () => null;
}
const NextWorkboxPlugin = require('next-workbox-webpack-plugin');
const withCSS = require('@zeit/next-css');
const WebpackPwaManifest = require('webpack-pwa-manifest');
const path = require('path');
module.exports = withCSS({
webpack(config, { isServer, buildId, dev }) {
config.node = {
@aslamdoctor
aslamdoctor / wp-ajax-loadmore.md
Last active November 22, 2023 00:41
Wordpress - AJAX Load More Steps

Step 1. Load more button

<?php
global $wp_query; // you can remove this line if everything works for you
 
// don't display the button if there are not enough posts
if (  $wp_query->max_num_pages > 1 )
	echo '<div class="misha_loadmore">More posts</div>'; // you can use <a> as well
?>
@ricealexander
ricealexander / css_colors.js
Last active April 10, 2023 10:20 — forked from bobspace/css_colors.js
an array that associates CSS color names with their hex values
// CSS Color Names
// Compiled by @bobspace
// Updates by @ricealexander
// added Rebecca Purple
// associates color names with their hex values
// random color and locating a color in the array by its name
const colorValues = [
{hex: "#F0F8FF", name: "AliceBlue"},
@tzmartin
tzmartin / embedded-file-viewer.md
Last active October 31, 2025 08:04
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links