Skip to content

Instantly share code, notes, and snippets.

View balazimichal's full-sized avatar

R2HC0D balazimichal

  • Bialystok, Poland
View GitHub Profile
@balazimichal
balazimichal / image_rotate.jquery.js
Last active December 25, 2017 20:37
jQuery image positioning after css rotation
var $img = $('.imagerotate img');
$img.on('load', function(){
var item_width = $(".pingster-gallery-item-image").width();
var image_width = $(".imagerotate img").width();
var image_height = $(".imagerotate img").height();
var scale = image_width / image_height;
var image_rotated_height = item_width * scale;
$(document).ready(function(){
$('input').focus(function(){
$enter = $(this).val();
$(this).val('');
});
$('input').blur(function(){
$leave = $(this).val();
if($leave=='') {$(this).val($enter);}
});
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello World</title>
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
</head>
<body>
@balazimichal
balazimichal / gist:be9fbb664b475f3ef84a56c92c61cd7b
Last active April 13, 2018 09:52
React-playground-counting-cars
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello World</title>
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
</head>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Car counter</title>
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Vue</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Vue</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
import React, { Component } from 'react';
import './App.css';
class App extends Component {
constructor(props) {
super(props)
this.addCount = this.addCount.bind(this)
this.deductCount = this.deductCount.bind(this)
}
@balazimichal
balazimichal / react-todo-search
Created July 9, 2018 10:11
React simple one page app with search.
@balazimichal
balazimichal / react-todo-local-storage
Last active July 9, 2018 11:56
React simple one page app with search and local storage.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>React Todo List</title>
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
</head>
<body>