Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠

Cosmic Sound uhlhosting

🏠
View GitHub Profile
View WooCommerce QR Code Payment For CZ
add_action('woocommerce_thankyou_bacs', 'wpd_qr_code', 10, 1 );
function wpd_qr_code( $order_id ) {
$order = wc_get_order( $order_id );
$bacs_info = get_option( 'woocommerce_bacs_accounts');
echo "<div style='display: grid; grid-template-columns: auto auto auto;'>";
foreach ($bacs_info as $info ) {
@uhlhosting
uhlhosting / index.html
Created Jan 17, 2022
WordPress Vue axios
View index.html
<div id="keywords">
<h2> Disclaimer : Demo data from CeleGabar.com </h2>
<ul>
<li class="hoge" v-for="post in filteredposts">
<a :href="post.link">{{post.title.rendered ? post.title.rendered : 'Hover'}}</a> <br/> {{post.date}} <hr/>
</li>
</ul>
</div>
@uhlhosting
uhlhosting / index.html
Created Jan 17, 2022
srcset for Wordpress post thumbnails
View index.html
<?php
function srcset_post_thumbnail($defaultSize = 'medium')
{
// those are the default thumbnail sizes for wordpress.
// we can -and should- define our own sizes according to our breakpoints
$thumbnailSizes = [
'thumbnail',
'medium',
@uhlhosting
uhlhosting / index.html
Created Jan 17, 2022
Responsive Team Section Using HTML , CSS , Bootstrap
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Responsive Team Section Using HTML5 , CSS3 , Bootstrap 4</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.css">
<link href="https://fonts.googleapis.com/css?family=Poppins:500,700&display=swap" rel="stylesheet">
@uhlhosting
uhlhosting / index.html
Created Jan 17, 2022
WordPress Snippet Template
View index.html
<h1>Title/explanation of Snippet here</h1>
<pre class="line-numbers"><code class="language-php">
</code></pre>
@uhlhosting
uhlhosting / index.html
Created Jan 17, 2022
Mask animation with GSAP & SVG
View index.html
<div id="home-animation-wrapper" style="opacity: 0">
<div class="slides">
<div class="slide" count="0" data-1="WE ARE" data-2="thinkers" data-3="+Doers"></div>
<div class="slide" count="1" data-1="WE ARE" data-2="optimists" data-3="+realists"></div>
<div class="slide" count="2" data-1="WE ARE" data-2="willing" data-3="+able"></div>
</div>
<svg version="1.1" id="home-animation" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="2371.2px" height="841.1px" viewBox="0 0 2371.2 841.1" xml:space="preserve">
<!-- <defs>
@uhlhosting
uhlhosting / index.html
Created Jan 17, 2022
Pickle-Rick Sliced 404
View index.html
<div class="svgcontainer">
<div class="subcont">
<div class="topconvo">
<span>!@#$</span><br />your portal gun must be busted...
</div>
<svg version="1.1" id="fourohfour" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 265.5 114" style="enable-background:new 0 0 265.5 114;" xml:space="preserve">
<g id="bottoms">
<g id="leftfourbottom">
@uhlhosting
uhlhosting / 500-error-log-file-stack-trace-animation.markdown
Created Jan 17, 2022
500 Error: Log File / Stack Trace Animation
View 500-error-log-file-stack-trace-animation.markdown

500 Error: Log File / Stack Trace Animation

This weeks code-doodle is just a little 500 error page mockup. Tried to capture the feeling of going through stack traces and lines and lines of log-files in an aesthetically pleasing way. -- wanted to mess around with css variables so likely doesn't work too well in ie :)

A Pen by Adam Quinlan on CodePen.

License.

View automatic-table-of-contents.markdown

Automatic Table of Contents

Just a little JS snippet that I developed for a colleague. They had an internal wiki and needed a way to automatically generate a simple table of contents in a certain format (1, 1.1, 1.1.1 etc) automatically based on the header tags. No style yet but this was a fun one.

A Pen by Adam Quinlan on CodePen.

License.

@uhlhosting
uhlhosting / btcpayserver_install_env.sh
Created Feb 14, 2021 — forked from rockstardev/btcpayserver_install_env.sh
Setting up BTCPayServer development environment on Linux (Ubuntu)
View btcpayserver_install_env.sh
# Installing prerequisites for BTCPayServer development on Ubuntu
# Install .NET Core SDK 2.2
# https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install?initial-os=linux
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo add-apt-repository universe