Skip to content

Instantly share code, notes, and snippets.

View papplo's full-sized avatar
💭
Working from 127.0.0.1

Pablo Anttila papplo

💭
Working from 127.0.0.1
View GitHub Profile
<?php
/*
* Creating a function to create our CPT LENEROS
*
*/
function create_posttype_leneros() {
register_post_type( 'leneros',
// CPT Options
@papplo
papplo / Gmaps with multiple markers and info box
Created April 7, 2016 16:23
Gmaps with multiple markers and info box
<script type="text/javascript">
function initialized() {
var map;
var bounds = new google.maps.LatLngBounds();
var mapOptions = {
mapTypeId: 'roadmap'
};
// Display a map on the page with div id show_map_div
@papplo
papplo / CssPopup.html
Last active April 7, 2016 16:26
Css Popup Sans Jscript
<!-- Call css apart -->
<style type="text/css">
body {
color: #333333;
font-family: 'Helvetica', arial;
height:1500px;
}
.wrap {
padding: 40px;
text-align: center;
<?php
function optimize_heartbeat_settings( $settings ) {
// Experiment with these two settings below
$settings['autostart'] = false; // default is true
$settings['interval'] = 60; // 15 sec by default
return $settings;
}
add_filter( 'heartbeat_settings', 'optimize_heartbeat_settings' );
@papplo
papplo / vanilla-js-cheatsheet.md
Created April 23, 2018 11:47 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
@papplo
papplo / Advanced JS
Last active September 10, 2024 12:23
# Advanced JS | Summary
The purpose of this sprint is to learn:
- Types, values and properties
- Function expressions vs function declarations
- Hoisting
- Closures
- Strict mode
- Context
@papplo
papplo / convert-array.js
Created May 1, 2018 07:24 — forked from hengkiardo/convert-array.js
Convert simple array into two-dimensional array(matrix) in javascript
function listToMatrix(list, elementsPerSubArray) {
var matrix = [], i, k;
for (i = 0, k = -1; i < list.length; i++) {
if (i % elementsPerSubArray === 0) {
k++;
matrix[k] = [];
}
matrix[k].push(list[i]);
}
return matrix;
@papplo
papplo / vortextab75.md
Created December 21, 2021 08:04 — forked from herpiko/vortextab75.md
Vortex Tab 75 Programming

Programming

  • Plug in the cable, you need the LED to guide you
  • Pn + Left Ctrl to enter programming mode
  • Press the key that want to be programmed
  • Press the target key
  • Pn to apply
  • Pn + Left Ctrl to exit

It's possible to lose a key. Sometimes you need to backup it first.

@papplo
papplo / Critical_rendering_path.md
Last active September 10, 2024 12:33
Critical Rendering Path: MDN Docs

(Originally from Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/Performance/Critical_rendering_path)

The Critical Rendering Path is the sequence of steps the browser goes through to convert the HTML, CSS, and JavaScript into pixels on the screen. Optimizing the critical render path improves render performance.The critical rendering path includes the Document Object Model (DOM), CSS Object Model (CSSOM), render tree and layout.

The document object model is created as the HTML is parsed. The HTML may request JavaScript, which may, in turn, alter the DOM. The HTML includes or makes requests for styles, which in turn builds the CSS object model. The browser engine combines the two to create the Render Tree. Layout determines the size and location of everything on the page. Once layout is determined, pixels