Skip to content

Instantly share code, notes, and snippets.

View reatlat's full-sized avatar
🖖
Live long and prosper!

Alex Zappa reatlat

🖖
Live long and prosper!
View GitHub Profile
@reatlat
reatlat / monitorEvents.js
Created April 13, 2021 21:50 — forked from PaulKinlan/monitorEvents.js
monitorEvents.js
function monitorEvents(element) {
var log = function(e) { console.log(e);};
var events = [];
for(var i in element) {
if(i.startsWith("on")) events.push(i.substr(2));
}
events.forEach(function(eventName) {
element.addEventListener(eventName, log);
});
@reatlat
reatlat / nearby_states.json
Created January 18, 2021 20:12
Nearby States
{
"AL": {
"MS": 334.2598088903816,
"TN": 356.97821657200916,
"GA": 376.7653825199441,
"SC": 560.5953436665313,
"KY": 658.9065611488494,
"FL": 732.4622655864152,
"MO": 771.1104811304031,
"VA": 788.1610036039323,
@reatlat
reatlat / debug.php
Last active July 24, 2023 23:44
Debug pretty print for PHP
<?php
/**
* Debug pretty print
* @author https://github.com/reatlat
*/
if (!function_exists('php_pretty_print')) :
/**
* Debug helper
* Pretty print the array
*/
@reatlat
reatlat / creative-cloud-disable.md
Created December 6, 2020 13:46 — forked from andreibosco/creative-cloud-disable.md
disable creative cloud startup on mac
//EnhanceJS isIE test idea
//detect IE and version number through injected conditional comments (no UA detect, no need for cond. compilation / jscript check)
//version arg is for IE version (optional)
//comparison arg supports 'lte', 'gte', etc (optional)
function isIE(version, comparison) {
var cc = 'IE',
b = document.createElement('B'),
@reatlat
reatlat / install-teamcity.md
Created May 26, 2020 02:14 — forked from ashwoods/install-teamcity.md
Install TeamCity 10.0.2 on Debian/Ubuntu with Nginx

Install

Follow the steps below to install Team City 10.0.2 on Debian/Ubuntu with Nginx as the proxy for port 80.

Requirements:

  • curl
  • configure utf-8 locale of your choice (recommended)

Install Team City:

http {
[...]
# webp support
# see: https://docs.ewww.io/article/16-ewww-io-and-webp-images
map $http_accept $webp_suffix {
default "";
"~*webp" ".webp";
}
server {
@reatlat
reatlat / test.html
Created April 23, 2020 23:14 — forked from srikat/test.html
Dummy Content for Gutenberg
<!-- wp:heading -->
<h2>Heading Block (H2)</h2>
<!-- /wp:heading -->
<!-- wp:heading -->
<h3>You are looking at one. (H3)</h3>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2>Subhead Block</h2>
@reatlat
reatlat / gutenberg-sample-content.html
Created April 23, 2020 23:10 — forked from mailenkno/gutenberg-sample-content.html
WordPress Gutenberg Sample Content
<!-- wp:paragraph {"align":"center","customTextColor":"#000000","backgroundColor":"very-light-gray","fontSize":"small"} -->
<p style="color:#000000;text-align:center" class="has-background has-small-font-size has-very-light-gray-background-color">Gutenberg Sample Content.<br/>Put together with ❤️ by <a href="https://artisanthemes.io/">Artisan Themes</a>.</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level":1} -->
<h1>This is a heading (H1)</h1>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2>This is a heading (H2)</h2>
<?php
class MyTheme
{
private function actionAfterSetup($function)
{
add_action('after_setup_theme', function() use ($function) {
$function();
});
}