Skip to content

Instantly share code, notes, and snippets.

View ArnaudValensi's full-sized avatar

Arnaud Valensi ArnaudValensi

View GitHub Profile
This file has been truncated, but you can view the full file.
[
{
"name": "PLAYERUNKNOWN'S BATTLEGROUNDS",
"owners_before_sale": 0,
"owners": 63688000,
"sales": 63688000,
"price": 29.99,
"metascore": 86,
"median_playtime_in_minutes": 11995
},
@ArnaudValensi
ArnaudValensi / app.js
Last active April 12, 2019 14:15
Developer Experience - Improve liana api.
const Liana = require('forest-express-sequelize');
const express = require('express');
const initCollections = require('./collections');
const initModels = require('./models');
const Sequelize = require('sequelize');
const sequelize = new Sequelize({
dialect: 'sqlite',
storage: 'database.sqlite',
});
import Ember from 'ember';
let previousMouseX = 0;
let previousMouseY = 0;
let mouseXInImage = 0;
let mouseYInImage = 0;
let scale = 1;
const zoomSpeed = 0.1;
export default Ember.Component.extend({
query IntrospectionQuery {
__schema {
queryType {
name
}
types {
...FullType
}
}
}
@ArnaudValensi
ArnaudValensi / docker-compose.yml
Created June 29, 2018 10:08
Docker compose mongodb
MongoDB:
image: sameersbn/mongodb:latest
ports:
- "27017:27017"
volumes:
- ./data/mongodb:/var/lib/mongodb
'use strict';
import Ember from 'ember';
import SmartViewMixin from 'client/mixins/smart-view-mixin';
export default Ember.Component.extend(SmartViewMixin, {
router: Ember.inject.service('-routing'),
store: Ember.inject.service(),
conditionAfter: null,
conditionBefore: null,
loaded: false,
import Ember from 'ember';
import SmartViewMixin from 'client/mixins/smart-view-mixin';
export default Ember.Component.extend(SmartViewMixin.default, {
router: Ember.inject.service('-routing'),
store: Ember.inject.service(),
actions: {
selectTreatment(patientId) {
const treatmentCollection = this.findCollectionByName('treatment');
const treatmentCollectionId = treatmentCollection[0].get('id');
@ArnaudValensi
ArnaudValensi / forestSmartActionLaravel.php
Last active April 27, 2018 10:18
Example of a Forest Smart Action on Laravel 5.5.x+
<!-- config/forest.php -->
<?php
return [
'secret_key' => '7a3049f8cd14e719c219e6d75e2a7715eef38bf6ec4be2ffc774a3374c9196a8',
'auth_key' => 'l8oeFltNrdrbq6pPeEGzxbG47h2qCK46',
'models_path' => 'app',
'url' => 'http://localhost:3001',
'debug_mode' => true,
'actions' => [
@ArnaudValensi
ArnaudValensi / create-ssl-cert.sh
Created January 9, 2018 09:39
Generate a self signed certificate without passphrase for private key
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 10000 -nodes
@ArnaudValensi
ArnaudValensi / composer.json
Created January 4, 2018 16:39
Laravel link package
"repositories": [
{
"type": "path",
"url": "/Users/arnaud/dev/forest/repos/forest-laravel",
"options": {
"symlink": true
}
}
],
"require": {