Skip to content

Instantly share code, notes, and snippets.

View SimonGenin's full-sized avatar

Simon Genin (ges@odoo) SimonGenin

View GitHub Profile
//- For use with https://github.com/CREEATION/laravel-elixir-jade
mixin blade()
='\r\n'
block
='\r\n'
mixin phpblock()
!='\r\n<?php '
Utiliser composer afin d'ajouter laravel
composer create-project laravel/laravel <nom du dossier> <version> --prefer-dist
<nom du dossier> et <version> ne sont pas obligatoires. (dev-master pour developpement)
Lancer un
npm install
afin d'importer les dépendances de gulp et elixir
Si utilisation de jade
npm install laravel-elixir-jade --save-dev
public class OnSwipeListener extends GestureDetector.SimpleOnGestureListener{
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
// Grab two events located on the plane at e1=(x1, y1) and e2=(x2, y2)
// Let e1 be the initial event
// e2 can be located at 4 different positions, consider the following diagram
// (Assume that lines are separated by 90 degrees.)
//
@SimonGenin
SimonGenin / introrx.md
Last active August 29, 2015 14:25 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@SimonGenin
SimonGenin / gist:2721baedc57876f10e32
Last active August 29, 2015 14:25 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
@SimonGenin
SimonGenin / frontendDevlopmentBookmarks.md
Last active August 29, 2015 14:25 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@SimonGenin
SimonGenin / business-models.md
Last active August 29, 2015 14:25 — forked from ndarville/business-models.md
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@SimonGenin
SimonGenin / latency.txt
Last active August 29, 2015 14:25 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms
@SimonGenin
SimonGenin / app.Exceptions.Handler.php
Created February 27, 2016 10:02
Add whoops php error rendering in laravel 5
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $e)
{
if ($this->isHttpException($e))
ACCESS REQUIRED
op1@workshop1.com
2017-12-10 17:56:54.929 DEBUG 15864 --- [nio-8080-exec-6] o.s.web.servlet.DispatcherServlet : DispatcherServlet with name 'dispatcherServlet' processing PUT request for [/api/op/movements/end/62]
2017-12-10 17:56:54.931 DEBUG 15864 --- [nio-8080-exec-6] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /api/op/movements/end/62
2017-12-10 17:56:54.932 DEBUG 15864 --- [nio-8080-exec-6] s.w.s.m.m.a.RequestMappingHandlerMapping : Returning handler method [public void mainApplication.controllers.OperatorAPI.MovementAPIOperator.end(int) throws mainApplication.exceptions.UnauthorizedException,mainApplication.exceptions.IncorrectStateException,mainApplication.exceptions.NonExistantAccountException,mainApplication.exceptions.NonExistantTicketException,mainApplication.exceptions.NonExistantVehiculeException,mainApplication.exceptions.DispatchIsNull,mainApplication.exceptions.OperatorIsNull,mainApplication.exceptions.IncorrectOperator]
2017-12-10 17:56