Skip to content

Instantly share code, notes, and snippets.

View johnHackworth's full-sized avatar

Javi A. johnHackworth

  • Madrid, Spain
View GitHub Profile
@johnHackworth
johnHackworth / chrome.html
Last active August 21, 2024 14:34
chrome nested css bug
<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
h1 {
color: red;
}
:bad-selector {
outline: auto;
// Adds a hotkey and returns a function to remove that specific hotkey
private addHotkey = (hotkey: HotkeyType): (() => void) => {
const { key } = hotkey;
// if this is not a iOS system, we replace any hotkey that has been defined to be used with `meta`
// with a `ctrl` version of itself.
if (
hotkey.modifiers &&
hotkey.modifiers[HotkeyModifiers.Meta] &&
<html><style> img { width: 500px; margin: 1em; } .content { margin: 2em; max-height: 600px; border: 3em solid #ADA; overflow: scroll; } </style><body><div class="vertical"><h1>file</h1><img src="https://a8cvm1.files.wordpress.com/2018/12/were-open-sign.jpg" /><img src="https://a8cvm1.files.wordpress.com/2018/12/bonjour-869208_1920.jpg" /><img src="https://a8cvm1.files.wordpress.com/2018/12/person-801829_1920.jpg" /><img src="https://a8cvm1.files.wordpress.com/2018/11/phone-table.jpg" /><img src="https://a8cvm1.files.wordpress.com/2018/11/cashual-meeting.jpg" /><img src="https://a8cvm1.files.wordpress.com/2018/11/pexels-355952.jpg" /><div class="content"><!-- wp:cover {"url":"https://a8cvm1.files.wordpress.com/2018/11/phone-table.jpg","id":118,"dimRatio":20,"align":"full"} -->
<div class="wp-block-cover alignfull has-background-dim-20 has-background-dim" style="background-image:url('https://a8cvm1.files.wordpress.com/2018/11/phone-table.jpg');"><div class="wp-block-cover__inner-container"><!-- wp:heading {"ali
{
"image-background":[
"background-image:url(https://images.pexels.com/photos/1954524/pexels-photo-1954524.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940);background-color:#000000",
"background-image:url(https://images.pexels.com/photos/669582/pexels-photo-669582.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940);background-color:#000000",
"background-image:url(https://images.pexels.com/photos/897061/pexels-photo-897061.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940);background-color:#000000"
],
"text-title":[
"Welcome to our gym",
"The best place for your training needs",
"Our personal trainers are here to help you",
{"image-background":["background-image:url(https:\/\/rockfielddemo.files.wordpress.com\/2019\/08\/appetizers-chef-cuisine-1267320-1-1.jpg);background-color:#000000","background-image:url(https:\/\/rockfielddemo.files.wordpress.com\/2019\/08\/blur-chef-close-up-671956-1.jpg);background-color:#000000","background-image:url(https:\/\/rockfielddemo.files.wordpress.com\/2019\/08\/ceiling-chairs-clean-2225570-1-1.jpg);background-color:#000000"],"text-title":["Enjoy Our Food Experience","Welcome to Rockfield","Discover Our Menu","Sample Menu","Book Your Table","Rockfield"],"text-description":["Chef Patron Joan Smith and Executive Chef Fran\u00e7ois Lemoine have teamed up to open one of the most exciting restaurants in Anytown.Our specialty is delicious\u00a0cuisine created with the ingenuity and passion inspired by the fantastic flavors of France\u00a0itself. We take great pride in improving upon your favorite French\u00a0dishes in new and creative ways.","The menu is a mix of French\u00a0regional cuisines, and the
{
"__file": "wp_block",
"title": "rockfield",
"content": "<!-- wp:cover {\"url\":\"https://rockfielddemo.files.wordpress.com/2019/08/appetizers-chef-cuisine-1267320-1-1.jpg\",\"id\":217,\"hasParallax\":true,\"dimRatio\":20,\"customOverlayColor\":\"#000000\",\"align\":\"full\",\"className\":\"a8c-image-background\"} -->\n<div class=\"wp-block-cover alignfull has-background-dim-20 has-background-dim has-parallax a8c-image-background\" style=\"background-image:url(https://rockfielddemo.files.wordpress.com/2019/08/appetizers-chef-cuisine-1267320-1-1.jpg);background-color:#000000\"><div class=\"wp-block-cover__inner-container\"><!-- wp:separator -->\n<hr class=\"wp-block-separator\"/>\n<!-- /wp:separator -->\n\n<!-- wp:spacer {\"height\":20} -->\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:heading {\"align\":\"center\",\"className\":\"a8c-text-title\"} -->\n<h2 class=\"has-text-align-center a8c-text-title\">Enjoy Our Food Experience</h2>\n<
/**
* WordPress dependencies
*/
import '@wordpress/editor'; // This shouldn't be necessary
import { render, useState, Fragment } from '@wordpress/element';
import {
BlockEditorProvider,
} from '@wordpress/block-editor';
import {
<?php
/**
* Plugin Name: Jetpack UI Test
* Version: 0.1.0
*/
add_action( 'admin_menu', 'jetpack_ui_test_register_page' );
add_filter( 'admin_enqueue_scripts', 'jetpack_ui_test_scripts' );
// add to jetpack-ui.php jetpack_ui_test_scripts()
wp_enqueue_style( 'jetpack-ui-styles', plugins_url( 'public/jetpack-debug.css', __FILE__ ) );
@johnHackworth
johnHackworth / jetpack.js
Created November 7, 2016 19:41
jetpack connect
const express = require('express');
const bodyParser = require('body-parser');
const path = require('path');
const app = express();
app.use( bodyParser() );
const Browser = require('zombie');
const Jetpack = function( res, url, user, pass) {
@johnHackworth
johnHackworth / reactExample.jsx
Created August 10, 2015 08:43
react example
React.createClass({
toggle: function() {
this.setState({
isWhatever: !! this.state.isWhatever
})
}
render: function() {
var activeClasses = classNames( {