Skip to content

Instantly share code, notes, and snippets.

View emendelski's full-sized avatar
👨‍🏭
FrontEnd Developer. In <3 with Vue.

Kamil Mendelski emendelski

👨‍🏭
FrontEnd Developer. In <3 with Vue.
View GitHub Profile
@emendelski
emendelski / currency_symbols.php
Last active March 4, 2019 15:55 — forked from dieppon/currency_symbols.php
An array of currency symbols as HTML entities
<?php
$currency_symbols = array(
'AED' => '&#1583;.&#1573;', // ?
'AFN' => '&#65;&#102;',
'ALL' => '&#76;&#101;&#107;',
'AMD' => '&#1380;',
'ANG' => '&#402;',
'AOA' => '&#75;&#122;', // ?
'ARS' => '&#36;',
'AUD' => '&#36;',
@emendelski
emendelski / Code.gs
Last active January 17, 2019 20:23 — forked from primaryobjects/Code.gs
Export a Google Drive spreadsheet to PDF in Google Drive in the same folder.
// Simple function to add a menu option to the spreadsheet "Export", for saving a PDF of the spreadsheet directly to Google Drive.
// The exported file will be named: SheetName and saved in the same folder as the spreadsheet.
// To change the filename, just set pdfName inside generatePdf() to something else.
// Running this, sends the currently open sheet, as a PDF attachment
function onOpen() {
var submenu = [{name:"Save PDF", functionName:"generatePdf"}];
SpreadsheetApp.getActiveSpreadsheet().addMenu('Export', submenu);
}
@emendelski
emendelski / replaced-jquery-with-vanilla-javascript.md
Last active January 23, 2019 16:00 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@emendelski
emendelski / sw.js
Created December 21, 2018 11:53 — forked from ireade/sw.js
Handle broken images with the service worker
self.addEventListener('install', (e) => {
e.waitUntil(
caches.open("precache").then((cache) => cache.add("/broken.png"))
);
});
function isImage(fetchRequest) {
return fetchRequest.method === "GET" && fetchRequest.destination === "image";
}
@emendelski
emendelski / library.scss
Created November 7, 2018 10:08 — forked from keeperofkeys/library.scss
URL-encode color SASS function / convert color to hex SASS function
//does not work with colors containing alpha
@function encodecolor($string) {
@if type-of($string) == 'color' {
@if $string != transparent {
$hex: str-slice(ie-hex-str($string), 4);
$string:unquote("#{$hex}");
$string: '%23' + $string;
}
}
@return $string;
@emendelski
emendelski / README.md
Created June 6, 2018 05:35 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@emendelski
emendelski / easing.css
Created June 21, 2017 06:12 — forked from bendc/easing.css
Easing CSS variables
:root {
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);