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
(function (factory) {
if (typeof define === 'function' && define.amd) {
// Existe AMD.
define(['jquery'], factory);
} else {
// Non existe, busca en global
factory(jQuery);
}
}(function ($) {
//Aqui o teu plugin
@oscarotero
oscarotero / jquery.plugin.js
Last active December 20, 2015 16:49
jQuery plugin boilerplate
;(function ($, window, document, undefined) {
var pluginName = "name", defaults = {};
function Plugin (element, options) {
this.element = element;
this.settings = $.extend({}, defaults, options);
this.init();
}
@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 / oom.html
Last active August 9, 2016 08:30
Selo para as webs.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--
███████
██████▌
▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄ ▄▄▄▄▄ ▄▄▄▄ ██████
▄███████████▄ ▄███████████▄ ▐█████▄███████▄▄███████▌ █████▌
▄██████▀ ▀████████████▀ ▀████████████▀▀███████▀▀███████ █████
@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');
# Undo latest commit
git reset --soft HEAD^
# Undo the changes of a commit (creating a new commit)
git revert <commit>
# Undo latest merge (before push)
git reset --merge ORIG_HEAD
# Merge a branch using the version of the current branch in case of conflicts
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) {
<?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;
<!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;
Plato Guille Oscar
Oreja ⭐⭐⭐
Ralla ⭐⭐⭐ ⭐⭐⭐
Fabada con almejas ⭐⭐⭐
Cocido ⭐⭐⭐ ⭐⭐⭐
Albóndigas ⭐⭐⭐
Jurel al ajillo
Espaguetis carbornara ⭐⭐⭐
Arroz marinera ⭐⭐