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
jgoux / app.js
Created April 15, 2014 14:53
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
View app.js
angular.module('myApp', ['ionic', '', 'myApp.controllers'])
.run(function(DB) {
jgoux / helpers.js
Last active April 6, 2016 16:21
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 / webpack.config.babel.js
Last active May 11, 2016 13:41
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 / NestedRoutes.purs
Created August 17, 2016 07:38 — forked from sloosch/NestedRoutes.purs
nested routes
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 / ClickCounter.purs
Created August 26, 2016 19:36 — 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

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 /
Created November 8, 2016 13:28 — forked from tcnksm/
How to install oracle client to Ubuntu 12.04

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
jgoux / utils.js
Last active December 20, 2016 19:46
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()],
(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 / App.jsx
Created February 15, 2017 21:51
Let's rebuild the GithubGist interface with react !
View App.jsx
// I leave out all the props & state, this is not the point here
// Level 1, can you directly grasp what's the page purpose?
// Assuming the component is in a "pages" folder, no need to append "Page" to it, it's all about context!
// Same apply for the Form component, the context says that we're here to create a new gist, no need to overthink the name.
// Putting the boring layout stuff into it's own component so you can focus on the page's domain.
const NewGist = () => (
<LastGistsNav />
<Form />
jgoux / database.js
Last active March 13, 2017 14:42
Database service
View database.js
import R from 'ramda';
import knex from 'knex';
export const connect = knex;
export const disconnect = async client => {
return await client.destroy();
export const withClient = R.curry(async (config, cb) => {