Skip to content

Instantly share code, notes, and snippets.

Avatar
I'm the fastest meme alive

Julien Goux jgoux

I'm the fastest meme alive
View GitHub Profile
@jgoux
jgoux / utils.js
Last active Dec 20, 2016
R.lens* and R.cond are best friends!
View utils.js
import R from 'ramda'
export const getFormData = R.pipe(
(form) => [...(new FormData(form)).entries()],
R.reduce(
(a, [k, v]) => {
const kL = R.lensProp(k)
return R.cond([
[R.pipe(R.view(kL), R.isNil), R.set(kL, v)],
[R.pipe(R.view(kL), R.isArrayLike), R.over(kL, R.append(v))],
@jgoux
jgoux / install_sqlplus.md
Created Nov 8, 2016 — forked from tcnksm/install_sqlplus.md
How to install oracle client to Ubuntu 12.04
View install_sqlplus.md

Install SQL*Plus

  1. Download .rpm package here
    • oracle-instantclinet*-basic-*.rpm
    • oracle-instantclinet*-devel-*.rpm
    • oracle-instantclinet*-sqlplus-*.rpm
  2. Install alien (sudo apt-get install alien)
  3. Convert the rpm files and install
    • sudo alien -i oracle-instantclinet*-basic-*.rpm
  • sudo alien -i oracle-instantclinet*-devel-*.rpm
View Advanced-FP-with-Scala.md

Advanced Functional Programming with Scala - Notes

Copyright © 2017 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@jgoux
jgoux / ClickCounter.purs
Created Aug 26, 2016 — forked from sloosch/ClickCounter.purs
Adapt State and Actions
View ClickCounter.purs
module ClickCounter where
import Prelude
import Component as C
import Pux.Html as H
import Pux.Html.Events as E
import Data.Generic (class Generic)
type State = Int
View NestedRoutes.purs
module Main where
import HeroPrelude
import Component as C
import Counter as Counter
import Data.String as String
import Pux as Pux
import Pux.Html as H
import Pux.Router as PuxRouter
import TypeHere as TypeHere
@jgoux
jgoux / webpack.config.babel.js
Last active May 11, 2016
Default webpack configuration file
View webpack.config.babel.js
import path from 'path'
import dotenv from 'dotenv'
import webpack from 'webpack'
import CopyPlugin from 'copy-webpack-plugin'
import HtmlPlugin from 'html-webpack-plugin'
import CleanPlugin from 'clean-webpack-plugin'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
// Constants ------------------------------------
@jgoux
jgoux / helpers.js
Last active Apr 6, 2016
redux-loop helpers
View helpers.js
import { loop, Effects as E, liftState } from "redux-loop"
import {
cond, pathEq, map, T, reduce, toUpper, pipe, transpose,
lensProp, set as lensSet, view as lensView
} from "ramda"
export const mkInit = (f) => pipe(f, liftState)
export const mkActionType = (namespace) => (type) => `${namespace}/${type}`
@jgoux
jgoux / app.js
Created Apr 15, 2014
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
View app.js
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});