Skip to content

Instantly share code, notes, and snippets.

View oscarotero's full-sized avatar
Beautiful, open and accessible web

Óscar Otero oscarotero

Beautiful, open and accessible web
View GitHub Profile
Plato Guille Oscar
Oreja ⭐⭐⭐
Ralla ⭐⭐⭐ ⭐⭐⭐
Fabada con almejas ⭐⭐⭐
Cocido ⭐⭐⭐ ⭐⭐⭐
Albóndigas ⭐⭐⭐
Jurel al ajillo
Espaguetis carbornara ⭐⭐⭐
Arroz marinera ⭐⭐
<!DOCTYPE html>
<html lang="gl">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Calculadora para facer pan</title>
<style type="text/css">
body {
font-family: sans-serif;
/**
* iPhone X notch: Remove the white bars in Safari
* It's needed to include the "viewport-fit=cover" directive in the html. For example:
* <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
*
* More info: http://stephenradford.me/removing-the-white-bars-in-safari-on-iphone-x/
*/
.wrapper {
background-color: red;
padding: env(safe-area-inset-top)

Proposal for a PSR for message translator

The main aim of this proposal is to provide a common interface for the interoperability of message translations across different packages

What is the scope?

  • Provide a way to consume message translations in different languages.
  • Allow handling plurals
  • Allow using translations from different contexts and domains
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/
class RoboFile extends \Robo\Tasks
{
private $dir;
private $className;
const through = require('through2');
const matter = require('front-matter');
module.exports = function () {
return through.obj(function (file, encoding, callback) {
callback(null, run(file));
});
}
function run (file) {
@oscarotero
oscarotero / cookies.js
Last active September 9, 2016 07:45
Scripts comúns
var $cookies = $('#cookies-message');
var cookies = localStorage.getItem('accept-cookies');
if (cookies !== 'accepted') {
$cookies.removeClass('is-accepted');
}
$cookies.find('button').on('click', function () {
$cookies.fadeOut('normal');
localStorage.setItem('accept-cookies', 'accepted');
@oscarotero
oscarotero / Utils.md
Last active November 5, 2019 15:50
Links utiles
@oscarotero
oscarotero / Instruccións.md
Last active July 20, 2016 18:18
Intruccións para instalar un servidor

Instalación dun servidor

1. Preparación básica

# Actualización de paquetes
apt-get update
apt-get upgrade

# Instalación doutros paquetes
@oscarotero
oscarotero / module.js
Created May 22, 2016 11:25
Boilerplate to create amd/cmjs/root js modules
(function (root, factory) {
if(typeof define === "function" && define.amd) {
// Now we're wrapping the factory and assigning the return
// value to the root (window) and returning it as well to
// the AMD loader.
define(["postal"], function(postal){
return (root.myModule = factory(postal));
});
} else if(typeof module === "object" && module.exports) {
// I've not encountered a need for this yet, since I haven't