Skip to content

Instantly share code, notes, and snippets.

View SimonGenin's full-sized avatar

Simon Genin (ges@odoo) SimonGenin

View GitHub Profile
@SimonGenin
SimonGenin / tsconfig.json
Created October 15, 2020 15:40 — forked from ryanatkn/tsconfig.json
A TypeScript 3.5 tsconfig.json with all options organized and with documentation comments
{
// Commented-out options have their default values.
"include": ["src/**/*"],
"exclude": ["node_modules/*"],
// "files": [], // A list of relative or absolute file paths to include.
// "extends": "", // A string containing a path to another configuration file to inherit from.
// "references": [], // An array of objects `{"path": "./to/dirOrConfig"}` that specifies projects to reference.
// "compileOnSave": false, // Signals to the IDE to generate all files for a given tsconfig.json upon saving.
"compilerOptions": {
data<-read.table("competition.csv",
sep=";",
header=TRUE,
dec=",")
# Ajoute la colonne de poids individuel
data$PoidsInd <- data$Poids/data$DensiteSp
# On sépare les deux espèces
@SimonGenin
SimonGenin / code.r
Created May 20, 2019 15:43
Code R - question 11
#Q11
MustardAnswer <- c(1, 1)
SeigleAnswer <- c(1, 1)
splittedBySpecies <- split( data , f = data$Espece )
for (species in splittedBySpecies) {
splittedBySpeciesAndDensity <- split (splittedBySpecies, f = splittedBySpecies$DensiteTot)
}
@SimonGenin
SimonGenin / install-Python-AmazonLinux-20171023.log
Created December 16, 2018 16:27
Amazon Linux AMI, pyenv, virtualenv, Python, ... Hello, World!
### prerequisites
sudo yum groupinstall "Development Tools"
git --version
gcc --version
bash --version
python --version # (system)
sudo yum install -y openssl-devel readline-devel zlib-devel
sudo yum update
### install `pyenv`
@SimonGenin
SimonGenin / index.html
Created July 3, 2018 22:56
Vue.JS - Advanced Data Grid Component
<script type="text/x-template" id="dropdown-template">
<div class="dropdown" v-show="show" v-bind:class="originClass" transition="dropdown">
<slot>No dropdown content!</slot>
</div>
</script>
<script type="text/x-template" id="datagrid-template">
<table id="{{ id }}" class="table-striped datagrid">
<thead>
<tr>
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
@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))
@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 / 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 / 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.