Skip to content

Instantly share code, notes, and snippets.

View uhlhosting's full-sized avatar
🏠
Working from home

Viorel-Cosmin Miron uhlhosting

🏠
Working from home
View GitHub Profile
@uhlhosting
uhlhosting / hookscript.pl
Created August 11, 2023 22:17 — forked from lucanastasio/hookscript.pl
Proxmox passthrough saver hook script
#!/usr/bin/perl
# Copyright (c) 2021 Luca Anastasio
# anastasio<dot>lu<at>gmail<dot>com
# Hookscript to avoid taking PCI passed through devices from running VMs
# also attaches them to their placeholders after guests are stopped
# You can set this via qm with
# qm set 100 --hookscript local:snippets/hookscript.pl
use strict;
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 January 17, 2022 09:32
WordPress Vue axios
<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 January 17, 2022 08:41
srcset for Wordpress post thumbnails
<?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 January 17, 2022 08:23
Responsive Team Section Using HTML , CSS , Bootstrap
<!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 January 17, 2022 07:15
WordPress Snippet Template
<h1>Title/explanation of Snippet here</h1>
<pre class="line-numbers"><code class="language-php">
</code></pre>
@uhlhosting
uhlhosting / index.html
Created January 17, 2022 07:07
Mask animation with GSAP & SVG
<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 January 17, 2022 07:04
Pickle-Rick Sliced 404
<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 January 17, 2022 06:59
500 Error: Log File / Stack Trace Animation

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.

@uhlhosting
uhlhosting / automatic-table-of-contents.markdown
Created January 17, 2022 06:55
Automatic Table of Contents

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.