Skip to content

Instantly share code, notes, and snippets.

View bhdzllr's full-sized avatar
👋
Hello

Bernhard bhdzllr

👋
Hello
View GitHub Profile
@abelcallejo
abelcallejo / README.md
Last active July 14, 2024 06:44
Creating bootable Linux USB using Mac

Creating bootable Linux USB using Mac

mac

CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

1. Prepare the .iso file

Download it, copy it, whatever it takes to prepare that Linux-based OS .iso file

2. Convert the .iso file into a .img.dmg

@EvanBacon
EvanBacon / apple-touch-startup-image.html
Created April 17, 2019 07:10
An example of full iOS PWA startup image (splash screen) support.
<html>
<head>
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-title" content="Expo" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<link
rel="apple-touch-icon"
sizes="180x180"
@n7studios
n7studios / post-to-social.php
Last active March 9, 2024 10:47
Determine Post Publish / Update via Classic Editor, Gutenberg and REST API
<?php
/**
* Example class implementation to perform actions, such as sending a Post
* to a third party API or service, when the Post is published or updated through:
* - Classic Editor
* - Gutenberg
* - REST API
*
* @package Post_To_Social
* @author Tim Carr
@jakub-g
jakub-g / async-defer-module.md
Last active July 15, 2024 12:12
async scripts, defer scripts, module scripts: explainer, comparison, and gotchas

<script> async, defer, async defer, module, nomodule, src, inline - the cheat sheet

With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.

This document is a comparison of various ways the <script> tags in HTML are processed depending on the attributes set.

If you ever wondered when to use inline <script async type="module"> and when <script nomodule defer src="...">, you're in the good place!

Note that this article is about <script>s inserted in the HTML; the behavior of <script>s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)

@freedmand
freedmand / tester.js
Last active November 7, 2018 11:13
JavaScript unit testing in under 30 lines
const PASS = ['32']; // green
const FAIL = ['31', '1']; // red, bold
function logStyle(ansiEscapeCodes, text) {
console.log(`\x1b[${ansiEscapeCodes.join(';')}m${text}\x1b[0m`);
}
class Tester {
constructor() {}
@stasius12
stasius12 / countries.py
Created September 23, 2018 10:38
List of all timezones with name of country and country code
countries = [
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'name': 'Afghanistan'},
{'timezones': ['Europe/Mariehamn'], 'code': 'AX', 'name': 'Aland Islands'},
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'name': 'Albania'},
{'timezones': ['Africa/Algiers'], 'code': 'DZ', 'name': 'Algeria'},
{'timezones': ['Pacific/Pago_Pago'], 'code': 'AS', 'name': 'American Samoa'},
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'name': 'Andorra'},
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'name': 'Angola'},
{'timezones': ['America/Anguilla'], 'code': 'AI', 'name': 'Anguilla'},
{'timezones': ['Antarctica/Casey', 'Antarctica/Davis', 'Antarctica/DumontDUrville', 'Antarctica/Mawson', 'Antarctica/McMurdo', 'Antarctica/Palmer', 'Antarctica/Rothera', 'Antarctica/Syowa', 'Antarctica/Troll', 'Antarctica/Vostok'], 'code': 'AQ', 'name': 'Antarctica'},
@clue
clue / 2018-04-13 getting-started-with-reactphp-workshop-phpyorkshire.md
Last active December 16, 2023 12:33
Getting started with ReactPHP – Pushing real-time data to the browser (PHPYorkshire)

Think about "PHP" for a few seconds… What came to mind? It’s very likely you thought about your average product catalog, a blogging platform or how the platform is inferior to things like Node.js. But wait, it’s 2018! What if I told you PHP’s huge ecosystem has way more to offer and PHP is not inferior at all to its evil cousin Node.js?

Hands-on workshop given at PHPYorkshire (2018-04-13)

Getting started with ReactPHP – Pushing real-time data to the browser

In this hands-on tutorial you will learn about the core concepts of async PHP and why you too should care about ReactPHP being a real thing. The workshop has a strong focus on sparking the idea that PHP can be way faster and more versatile than you probably thought. Bring along an open mind and through lots of interesting examples and live demos learn why what sounds crazy at first might soon be a valuable addition in your toolbox.

You’re already familiar with PHP and want to learn what ReactPHP is all about? Then this tutorial is for you! We will

@hisplan
hisplan / add-rsync-to-git-bash.md
Created February 21, 2018 09:02
Add rsync to git bash for windows
@praveenpuglia
praveenpuglia / shadow-dom.md
Last active March 28, 2024 15:06
Everything you need to know about Shadow DOM

I am moving this gist to a github repo so more people can contribute to it. Also, it makes it easier for me to version control.

Please go to - https://github.com/praveenpuglia/shadow-dom-in-depth for latest version of this document. Also, if you find the document useful, please shower your love, go ⭐️ it. :)

Shadow DOM

Heads Up! It's all about the V1 Spec.

In a nutshell, Shadow DOM enables local scoping for HTML & CSS.

@smtm
smtm / rksv.php
Last active March 28, 2020 11:52
RKSV logic as PHP implementation (wrapped into a html page with a test scenario)
<html>
<head>
<title>RKSV PHP Funktionen</title>
</head>
<body>
<h1>RKSV PHP Funktionen in PHP </h1>
<p> 31.1.2017 as per <a href="https://github.com/a-sit-plus/at-registrierkassen-mustercode/issues/220#issuecomment-276019670">github comment thread</a></p>
<?php
$aeskey = "WQRtiiya3hYh/Uz44Bv3x8ETl1nrH6nCdErn69g5/lU=";