Skip to content

Instantly share code, notes, and snippets.

View hunsly's full-sized avatar

hunsly hunsly

  • Budapest
View GitHub Profile
/**
Example:
getHTMLSubElements(HTML, '.cssSelector');
getHTMLSubElements(HTML, '#idSelector');
getHTMLSubElements(HTML, 'SubTagName .cssSelector');
*/
function getHTMLSubElements(HTML, sel) {
let root = document.createElement("DIV");
root.innerHTML = HTML;
@hunsly
hunsly / functions.php
Last active October 15, 2023 09:28
Wordpress WooCommerce Unit Price shortcode
<?php
/**
* Shortcode for product unit price.
*
* Example:
* [woo_product_unit_price unit="Kg" unit_ratio="0.25"]
*
* Frontend view:
* Egységár: 1000 Ft / Kg
*
@hunsly
hunsly / test.yml
Last active February 9, 2018 22:25 — forked from anonymous/test.yml
mongo and nodejs docker yml
version: '2'
services:
web:
image: node:argon
volumes:
- ./www:/usr/src/app
ports:
- "3000:8080"
depends_on:
@hunsly
hunsly / hup.hu.mobile.user.js
Last active January 25, 2018 08:32
Hup.hu mobil design
// ==UserScript==
// @name hup.hu.mobile
// @namespace https://gist.github.com/hunsly/3b0de70430d9f231b510f2750d3d5f91/
// @version 0.2
// @description Top menut alakit ki az oldal tetejen
// @author hunsly
// @updateURL https://gist.github.com/hunsly/3b0de70430d9f231b510f2750d3d5f91/raw/hup.hu.mobile.user.js
// @downloadURL https://gist.github.com/hunsly/3b0de70430d9f231b510f2750d3d5f91/raw/hup.hu.mobile.user.js
// @match https://hup.hu/*
// @grant none