Skip to content

Instantly share code, notes, and snippets.

View osvik's full-sized avatar
💭
Working

Osvaldo osvik

💭
Working
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@osvik
osvik / deferred-styles.html
Created August 31, 2018 18:17
Deferred CSS Styles - Faster html pages
<noscript id="deferred-styles">
<link rel="stylesheet" type="text/css" href="" />
</noscript>
<script>
var loadDeferredStyles = function() {
var addStylesNode = document.getElementById("deferred-styles");
var replacement = document.createElement("div");
replacement.innerHTML = addStylesNode.textContent;
document.body.appendChild(replacement);
addStylesNode.parentElement.removeChild(addStylesNode);
@osvik
osvik / generic.html
Last active December 4, 2018 01:26
Responsive svg infographics
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Responsive infographic test - Generic</title>
<style type="text/css">
html,
body {
margin: 0;
@osvik
osvik / embedded.html
Last active March 24, 2019 21:24
Really responsive iframes! Gets the iframe height from the embedded html document
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Embedded html document</title>
<style>
html,
body {
margin: 0;
@osvik
osvik / dynamic.html
Created March 25, 2019 20:29
Responsive elements based on parent column width
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Responsive elements based on parent column width</title>
</head>
<body>

SVGjs CHEAT SHEET

More info...

Begining of the svg file

Adobe Illustrator will give you something like this, but you must add the width and height attributes based in the viewBox.

<?xml version="1.0" encoding="utf-8"?>
<?php
/**
* Añade capacidades a editores y admins
*/
function editor_unfiltered_upload( $caps, $cap, $user_id ) {
if ( "unfiltered_upload" === $cap && user_can( $user_id, "editor" ) ) {
$caps = array( "unfiltered_upload" );
}