Skip to content

Instantly share code, notes, and snippets.

View GiuMagnani's full-sized avatar
👨‍💻
Having fun with JavaScript

Giu Magnani GiuMagnani

👨‍💻
Having fun with JavaScript
View GitHub Profile
!function(e){var t={};function n(i){if(t[i]){return t[i].exports}var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t){return e}if(4&t&&"object"==typeof e&&e&&e.__esModule){return e}var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e){for(var a in e){n.d(i,a,function(t){return e[t]}.bind(null,a))}}return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/public/",n(n.s=274)}([function(e,t,n){(function(e){e.exports=function(){"use strict";var t,i;function a(){return t.app
@GiuMagnani
GiuMagnani / email.html
Created December 9, 2019 14:50
responsive html email template with image
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Simple Transactional Email</title>
<style>
/* -------------------------------------
INLINED WITH htmlemail.io/inline
------------------------------------- */
@GiuMagnani
GiuMagnani / select.css
Created November 15, 2019 20:18
CSS unstyled select with data64 arrow
select {
-moz-appearance: none;
-webkit-appearance: none;
appearance:none;
border-radius: 0;
color: black;
font-size: 18px;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAh0lEQVQ4T93TMQrCUAzG8V9x8QziiYSuXdzFC7h4AcELOPQAdXYovZCHEATlgQV5GFTe1ozJlz/kS1IpjKqw3wQBVyy++JI0y1GTe7DCBbMAckeNIQKk/BanALBB+16LtnDELoMcsM/BESDlz2heDR3WePwKSLo5eoxz3z6NNcFD+vu3ij14Aqz/DxGbKB7CAAAAAElFTkSuQmCC');
background-repeat: no-repeat;
background-position: 98% center;
aside.sidebar.sidebar--condensed {
background: #36374c;
}
.sidebar-item--active {
background-color: #414852;
}
.sidebar-item:hover {
background-color: #1f2329;
@GiuMagnani
GiuMagnani / ZiYoungSelectComponent2.vue
Created November 27, 2018 10:39
ZiYoungSelectComponent v0.2
<template>
<el-select :value="value" @input="handleInput($event)" filterable placeholder="Select" :filter-method="filterCustomMethod"
default-first-option>
<el-option v-for="(item, index) in filteredOptions" :key="item[valueField]" :label="item[labelField]" :value="item[valueField]">
</el-option>
</el-select>
</template>
<script lang="ts">
import Vue from 'vue';
@GiuMagnani
GiuMagnani / ZiYoungSelectComponent.vue
Created November 27, 2018 09:25
ZiYoungSelectComponent
<template>
<el-select :value="value" @input="handleInput($event)" filterable placeholder="Select" :filter-method="doFilter"
default-first-option>
<el-option v-for="item in options" :key="item[valueField]" :label="item[labelField]" :value="item[valueField]">
</el-option>
</el-select>
</template>
<script lang="ts">
import Vue from 'vue';
@GiuMagnani
GiuMagnani / SVGtoKeyedObject.js
Last active December 15, 2018 23:35
Node script to take the data from SVG paths ("d", "filename" and "viewBox") and print them as a keyed object for Icon Components.
const testFolder = __dirname + '/svgs';
const fs = require('fs');
fs.readdir(testFolder, (err, files) => {
const filePromises = [];
files.forEach((file, index) => {
let concatenatedPath = "";
if (file.indexOf('svg') === -1) return;
@GiuMagnani
GiuMagnani / clann.js
Last active September 11, 2018 12:31
Sorint Clann
const PranzoTimes = [
"12:30:00-13:00:00",
"12:30:00-12:45:00",
"13:00:00-13:30:00"
];
PranzoTimes.map(function(time) {
$('#div-pranzo').append('<button class="my-custom-button-meal">' + time + '</button>');
});
@GiuMagnani
GiuMagnani / svgo-config.json
Created August 13, 2018 15:14
Config file for SVGO based on config from https://jakearchibald.github.io/svgomg/
{
"plugins": [
{ "removeDoctype": true },
{ "removeXMLProcInst": true },
{ "removeComments": true },
{ "removeMetadata": true },
{ "removeXMLNS": true },
{ "removeEditorsNSData": true },
{ "cleanupAttrs": true },
{ "inlineStyles": true },
@GiuMagnani
GiuMagnani / with-circle-tags.svg
Last active January 20, 2018 00:00
SVG with <circle> tags
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.