Skip to content

Instantly share code, notes, and snippets.

View jgoux's full-sized avatar
I'm the fastest meme alive

Julien Goux jgoux

I'm the fastest meme alive
View GitHub Profile
@mattpodwysocki
mattpodwysocki / users.html
Created April 15, 2015 21:25
Getting a list of users with RxJS and JSX
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-type' content='text/html; charset=utf-8'>
<title>Basic Example with JSX</title>
<link rel="stylesheet" href="base.css" />
</head>
<body>
<h1>ReactJs + RxJs</h1>
<div id="container">
compiler-check: match-exact
resolver: lts-7.10
compiler: ghc-8.0.1.20161117
setup-info:
ghc:
linux64:
8.0.1.20161117:
url: http://downloads.haskell.org/~ghc/8.0.2-rc1/ghc-8.0.1.20161117-x86_64-deb8-linux.tar.xz
content-length: 112047972
sha1: 6a6e4c9c53c71cc84b6966a9f61948542fd2f15a
@dmfay
dmfay / collapse.js
Last active September 6, 2017 17:56
Collapse JOIN query result sets into a hierarchical object graph
'use strict';
/**
* Collapses tabular result sets into a (hierarchical) object graph based on
* column nomenclature. Given a query that selects parent and child columns as
* parent__id, parent__val, children__id, children__val, this will return an
* array of objects in the form
*
* {id: 1, val: 'parent val', children: [{id: 11, val: 'child val'}]}
*
@roman01la
roman01la / app.js
Last active September 9, 2017 06:49
Minimal setup for efficient state management and rendering in React with single atom state
import React from 'react';
import { render } from 'react-dom';
import Root from './components/root.jsx';
import { silentSwap } from './lib/atom';
import { fromJS } from 'immutable';
import './stores/ui';
const initialState = {
ui: {
@tomyam1
tomyam1 / gridVariables.less
Created November 13, 2014 16:48
ui-grid bootstrap
@import "../../../../vendor/angular-ui-grid-src/src/less/grid";
@import "../../../../vendor/angular-ui-grid-src/src/less/header";
@import "../../../../vendor/angular-ui-grid-src/src/less/body";
@import "../../../../vendor/angular-ui-grid-src/src/less/cell";
@import "../../../../vendor/angular-ui-grid-src/src/less/native-scrollbar";
@import "../../../../vendor/angular-ui-grid-src/src/less/footer";
@import "../../../../vendor/angular-ui-grid-src/src/less/menu";
@import "../../../../vendor/angular-ui-grid-src/src/less/sorting";
@import "../../../../vendor/angular-ui-grid-src/src/less/icons";
@import "../../../../vendor/angular-ui-grid-src/src/less/rtl";
#!/usr/bin/env stack
{-
stack
--resolver lts-8.4
--install-ghc
runghc
--package aeson
--package aeson-casing
--package base
--package bytestring
@petermoresi
petermoresi / Makefile
Last active November 14, 2019 19:58
A Makefile for web developers using babel with webpack or browserify
# Makefile for web development with:
# 1. ES6 / Babel compiler
# setup: npm install babel
# 2. Bundler (Webpack or Browserify)
# setup: npm install webpack|browserify
# 3. Static Web Server
# setup: npm install http-server
WEBMAKE = webmake
WEBPACK = webpack
@necrobious
necrobious / gist:14d78ee9b4caff766152
Created July 12, 2014 18:56
Ubuntu 14.04 + GHC 7.8.3 + cabal-install 1.20.0.3
# build with
# docker build -t 'necrobious/haskell-ghc-7.8-64' .
FROM ubuntu:14.04
MAINTAINER necrobious@gmail.com
ENV DEBIAN_FRONTEND noninteractive
####### Install Dependencies ###################################################
RUN apt-get -y update
@jaredpalmer
jaredpalmer / EmailInput.jsx
Created November 29, 2017 18:06
Formik async email signup input
import React from 'react';
import debounce from 'utils/debounce';
class EmailInput extends React.Component {
checkEmail = value => {
// only check if the field passes Yup email validation first
if (
!this.props.form.errors[this.props.name].includes(
'invalid' /* or whatever your error message is*/
)
@sibelius
sibelius / PostLikeButton.spec.tsx
Created May 6, 2020 16:32
how to test useFragment
export const getRoot = ({ preloadedQuery }) => {
const UseQueryWrapper = () => {
const data = usePreloadedQuery<PostLikeButtonSpecQuery>(
graphql`
query PostLikeButtonSpecQuery($id: ID!) @relay_test_operation {
post: node(id: $id) {
...PostLikeButton_post
}
}
`,