Skip to content

Instantly share code, notes, and snippets.

View XeeD's full-sized avatar

Lukáš Voda XeeD

View GitHub Profile
@comficker
comficker / HEX2RGB.js
Created June 6, 2018 01:16
Bellow are javascript code can convert hex to rgb color. Demo: http://aiconverter.com/color/hex-to-rgb
function HEX2RGB (hex) {
"use strict";
if (hex.charAt(0) === '#') {
hex = hex.substr(1);
}
if ((hex.length < 2) || (hex.length > 6)) {
return false;
}
var values = hex.split(''),
r,
@ebidel
ebidel / feature_detect_es_modules.js
Last active September 4, 2023 13:56
Feature detect ES modules: both static import and dynamic import()
<!--
Complete feature detection for ES modules. Covers:
1. Static import: import * from './foo.js';
2. Dynamic import(): import('./foo.js').then(module => {...});
Demo: http://jsbin.com/tilisaledu/1/edit?html,output
Thanks to @_gsathya, @kevincennis, @rauschma, @malyw for the help.
-->
@peterdemartini
peterdemartini / command.sh
Last active March 6, 2025 07:29
Exclude node_modules in timemachine
find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion

React is the new Lego - how we deal with a lot of components

Lightning talk proposal for ReactiveConf 2016

BlueKit usage

At Blueberry, we've been frustrated with maintaining and getting oriented in our React components and their props. That's why we made a tool for automatically generating a component library from a project's components.

We named it BlueKit and released it as open-source.

@Jonty
Jonty / .gitconfig
Last active January 11, 2018 11:55
A git alias to rebase all commits added on the current branch
[alias]
rebase-branch = !git rebase -i --autosquash $(git merge-base --fork-point origin/master HEAD)
@gigiigig
gigiigig / auxpattern.scala
Last active January 8, 2025 00:31
Aux Pattern
import shapeless._
import scalaz._
import Scalaz._
object console extends App {
trait Foo[A] {
type B
def value: B
@steida
steida / gist:570d007c94a25fa68443
Last active October 10, 2015 18:05
listenFirebase higher order component
import Component from './component.react';
import React from 'react';
import {firebase, onFirebaseError} from '../firebase';
import {firebaseCursor} from '../state';
// This is super handy for monitoring listened refs.
function addListenedRef(ref) {
firebaseCursor(firebase => firebase
.update('listenedRefs', listenedRefs => listenedRefs
// But unfortunately querystring is not part of serialization. Kato from
@XeeD
XeeD / JavaScript.md
Last active March 9, 2016 06:07
JavaScript stack resources
@steida
steida / gist:9d80c9858d1bc31741d1
Last active August 29, 2015 14:19
Loading Pure component
import PureComponent from './purecomponent.react'
import React from 'react'
import classnames from 'classnames'
import {msg} from '../intl/store'
require('./loading.styl')
export default class Loading extends PureComponent {
constructor(props) {

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).