Skip to content

Instantly share code, notes, and snippets.

@kublaj
kublaj / fancy-tabs-demo.html
Created July 20, 2018 15:09 — forked from ebidel/fancy-tabs-demo.html
Fancy tabs web component - shadow dom v1, custom elements v1, full a11y
<script>
function execPolyfill() {
(function(){
// CustomElementsV1.min.js v1 polyfill from https://github.com/webcomponents/webcomponentsjs/tree/v1/src/CustomElements/v1.
/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@kublaj
kublaj / fancy-tabs-demo.html
Created July 20, 2018 15:09 — forked from ebidel/fancy-tabs-demo.html
Fancy tabs web component - shadow dom v1, custom elements v1, full a11y
<script>
function execPolyfill() {
(function(){
// CustomElementsV1.min.js v1 polyfill from https://github.com/webcomponents/webcomponentsjs/tree/v1/src/CustomElements/v1.
/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@kublaj
kublaj / main.dart
Created January 31, 2018 09:38 — forked from chalin/main.dart
Todo-list generator for webdev.dartlang.org/guides/get-started
void main() {
thingsTodo().forEach(print);
}
Iterable<String> thingsTodo() sync* {
var actions = ['Walk', 'Wash', 'Feed'];
var pets = ['cats', 'dogs'];
for (var action in actions) {
for (var pet in pets) {
@kublaj
kublaj / index.html
Created January 31, 2018 09:34 — forked from devoncarew/index.html
Sunflower
<!-- Copyright 2011 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>Dr. Fibonacci's Sunflower Spectacular</h2>
<div>
<canvas id="canvas" width="300" height="300"></canvas>
</div>
@kublaj
kublaj / index.php
Created June 22, 2017 12:08 — forked from totya24/index.php
Google Page Insight
<!DOCTYPE html>
<html lang="hu">
<head>
<meta charset="utf-8">
<title>Page insights</title>
</head>
<body>
<form method="POST" action="">
<input type="text" name="url" placeholder="url"><input type="submit" value="Get insights" />
</form>
@kublaj
kublaj / htaccess
Created January 6, 2017 12:36 — forked from munchicken/htaccess
HTTP Status Cats Apache (htaccess) config
# HTTP Status Cats
# Apache (htaccess) config originally created by @dave1010,
# rebuilt by Sarah Pierce (see modifications section)
# Licensed CC BY 2.0
# Images CC BY 2.0, from GirlieMac's photostream:
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/
# Usage: copy save this file as .htaccess or add it to your httpd.conf
@kublaj
kublaj / gulpfile.js
Created December 13, 2016 11:51 — forked from totya24/gulpfile.js
Our gulpfile
var gulp = require('gulp');
var gutil = require('gulp-util');
var autoprefixer = require('gulp-autoprefixer');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var cleanCSS = require('gulp-clean-css');
var newer = require('gulp-newer');
var uglify = require('gulp-uglify');
var order = require("gulp-order");
var cssBase64 = require('gulp-css-base64');
@kublaj
kublaj / textStorage.js
Created August 15, 2016 08:46 — forked from sofish/textStorage.js
Cross-browser TextStorage Solution
/**
* @ NAME: Cross-browser TextStorage
* @ DESC: text storage solution for your pages
* @ COPY: sofish, http://sofish.de
*/
typeof window.localStorage == 'undefined' && ~function () {
var localStorage = window.localStorage = {},
prefix = 'data-userdata',
doc = document,
@kublaj
kublaj / jslogger
Created June 23, 2016 08:23 — forked from totya24/jslogger
log js errors on server side
js: place in the head of html
<script type="text/javascript">
window.onerror = function (errorMsg, url, lineNumber, column, errorObj) {
if (errorMsg.indexOf('Script error.') > -1) {
return;
}
var text = 'Err: ' + errorMsg + ' | Script: ' + url + ' | Ln: ' + lineNumber + (column ? ' | Clmn: ' + column : '') + (errorObj ? ' | Stacktrc: ' + errorObj : '');
var r = new XMLHttpRequest();
var params = "d=" + encodeURIComponent(text);
@kublaj
kublaj / index.php
Created June 23, 2016 08:22 — forked from totya24/index.php
jQuery method usage statistic
<?php
/** included from: https://github.com/neitanod/forceutf8 */
class Encoding {
const ICONV_TRANSLIT = "TRANSLIT";
const ICONV_IGNORE = "IGNORE";
const WITHOUT_ICONV = "";
protected static $win1252ToUtf8 = array(
128 => "\xe2\x82\xac",