Skip to content

Instantly share code, notes, and snippets.

View HenriqueLimas's full-sized avatar

Henrique Limas HenriqueLimas

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
div {
background-color: grey;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
html, body {
font-family: Arial, Helvetica;
height: 100%;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.image {
list-style-image: url('http://www.maujor.com/tutorial/interativo/logo-css3.png');
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
div.before::before {
content: "I'm from css before";
}
div.after::after {
@HenriqueLimas
HenriqueLimas / geolocation-marker.js
Last active August 29, 2015 14:27
Gelocation Marker in ES6
/**
* @name GeolocationMarker for Google Maps v3
* @version version 1.0
* @author Chad Killingsworth [chadkillingsworth at missouristate.edu]
* Copyright 2012 Missouri State University
* @fileoverview
* This library uses geolocation to add a marker and accuracy circle to a map.
* The marker position is automatically updated as the user position changes.
*/
var data = [
{author: 'Pete Hunt', text: 'This is one comment'},
{author: 'Jordan Walke', text: 'This is *another* comment'}
];
var Comment = React.createClass({
render: function(){
var rawMarkup = marked(this.props.children.toString(), {sanitize: true});
return (
<div className="comment">
@HenriqueLimas
HenriqueLimas / dropdown.js
Created May 3, 2016 12:36
Dropdown with RxJs
let Observable = Rx.Observable;
let div:Element = document.querySelector('.to-drag');
let mousedown = Observable.fromEvent(div, 'mousedown');
let mouseup = Observable.fromEvent(document, 'mouseup');
let mousemove = Observable.fromEvent(document, 'mousemove');
mousedown.forEach((e) => {
return mousemove
@HenriqueLimas
HenriqueLimas / autocomplete.js
Created May 3, 2016 19:55
Autocomplete with RxJS
let Observable = Rx.Observable;
let input:Element = document.querySelector('#autocomplete');
let list:Element = document.querySelector('.results');
let keyup = Observable.fromEvent(input, 'keyup');
keyup
.debounce(250)
.map((e) => e.target.value)
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.0.6/rx.all.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
function createCarousel({itens}) {
'use strict';
const SIZE = 88;
const current = {
index: 0,
position: 0
};
let carousel = document.createElement('div');