Skip to content

Instantly share code, notes, and snippets.

View tzvety's full-sized avatar

Tsvety tzvety

View GitHub Profile
@tzvety
tzvety / app.html
Last active September 18, 2020 21:31 — forked from taosd/app.html
Resize events
<template>
<div class="wrapper ${(window.innerWidth > 700) ? 'resized' : ''}" >
Resize me <br/><hr style="height: 1px; border: 0; background-color: black; ">
Window width: ${window.innerWidth}
</div>
</template>
@tzvety
tzvety / app.html
Last active June 19, 2020 21:48
Aurelia Validation Demo
<template>
<require from="./registration-form"></require>
<registration-form></registration-form>
</template>
@tzvety
tzvety / app.html
Last active June 19, 2020 10:14 — forked from jdanyow/app.html
Aurelia Validation Demo
<template>
<require from="./registration-form"></require>
<registration-form></registration-form>
</template>
@tzvety
tzvety / jquery.deferred.promise.js
Created October 19, 2018 07:46 — forked from pbojinov/jquery.deferred.promise.js
simple jQuery Deferred example
function getData() {
var deferred = $.Deferred();
$.ajax({
'url': 'http://google.com',
'success': function(data) {
deferred.resolve('yay');
},
'error': function(error) {
deferred.reject('boo');
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
body {
background: #dfdfdf;
padding: 20px;
<p>&lt;!DOCTYPE html&gt;</p>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
body {
background: #dfdfdf;
padding: 20px;