Skip to content

Instantly share code, notes, and snippets.

Baptiste Pesquet bpesquet

Block or report user

Report or block bpesquet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bpesquet
bpesquet / .eslintrc.json.expo
Created Jan 31, 2019
ESLint configuration file for Expo SDK 32+
View .eslintrc.json.expo
{
"extends": ["airbnb", "prettier", "prettier/react"],
"parser": "babel-eslint",
"env": {
"react-native/react-native": true
},
"plugins": ["react", "react-native"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
@bpesquet
bpesquet / jupyterhub-install.md
Created Sep 17, 2018
JupyterHub installation on Ubuntu 16.04
View jupyterhub-install.md
  • Ubuntu 16.04
  • CUDA 9.2
  • cuDNN 7.1.4
  • TF dependancies
  • Anaconda 3 in /usr/local/anaconda3
  • Clone TF 1.8
  • Compil TF (Python 3.6 par défaut)
  • Build package TF
  • sudo visudo. Add /usr/local/anaconda3/bin at end of secure_path
  • sudo pip install tensorflow*.whl
@bpesquet
bpesquet / .gitattributes-lfs-unity
Last active Apr 15, 2019
.gitattributes file for LFS with Unity
View .gitattributes-lfs-unity
* text=auto
# Unity files
*.meta -text -merge=unityamlmerge
*.unity -text -merge=unityamlmerge
*.asset -text -merge=unityamlmerge
*.prefab -text -merge=unityamlmerge
# Image formats
*.psd filter=lfs diff=lfs merge=lfs -text
@bpesquet
bpesquet / RapportVisiteType.php
Last active Mar 22, 2016
Using Symfony choice form field type with Silex
View RapportVisiteType.php
// Classe RapportVisiteType
<?php
namespace GSB\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class RapportVisiteType extends AbstractType
{
@bpesquet
bpesquet / gist:79656dc16f0c2c03b3fb
Created Oct 28, 2015
Deploy Silex/MySQL app to OpenShift
View gist:79656dc16f0c2c03b3fb
$ git remote add openshift <openshift_git_repo_url>
$ git fetch openshift
$ git merge openshift/master -s recursive -X ours
$ touch .openshift/markers/use_composer
@bpesquet
bpesquet / gist:969ea9a0b399cf9aeeac
Last active Oct 22, 2015
Create a new Jekyll course based on class-boilerplate
View gist:969ea9a0b399cf9aeeac
<create new repo on GitHub>
$ git clone <new repo URL>
$ git remote add boilerplate https://github.com/bpesquet/class-boilerplate.git
$ git fetch boilerplate
$ git merge boilerplate/master
@bpesquet
bpesquet / gist:935e365e31cc991cccdc
Created Oct 13, 2015
Deploy MySQL app on Heroku Europe
View gist:935e365e31cc991cccdc
$ heroku create <appname> --region eu
$ heroku addons:create cleardb:ignite
$ heroku config | grep CLEARDB_DATABASE_URL
<Create DB with MySQL Workbench>
$ git push heroku master
@bpesquet
bpesquet / rpg_oloo.js
Created Sep 20, 2015
Minimalist RPG exemple written in the OLOO style
View rpg_oloo.js
var Character = {};
Character.initCharacter = function (name, health, strength) {
this.name = name;
this.health = health;
this.strength = strength;
};
Character.attack = function (target) {
if (this.health > 0) {
var damage = this.strength;
console.log(this.name + " attacks " + target.name + " and deals " + damage + " damage");
@bpesquet
bpesquet / rpg_es2015.js
Last active Sep 17, 2015
Minimalist RPG example written with ES2015 syntax
View rpg_es2015.js
class Character {
constructor(name, health, strength) {
this.name = name;
this.health = health;
this.strength = strength;
}
describe() {
return this.name + " has " + this.health +
" health points and " + this.strength + " strength";
@bpesquet
bpesquet / gist:501c789f01e5bdeda90d
Last active Jun 6, 2017
Hashed password generation with Silex
View gist:501c789f01e5bdeda90d
$app->get('/hashpwd', function() use ($app) {
$rawPassword = 'secret';
$salt = '%qUgq3NAYfC1MKwrW?yevbE';
$encoder = $app['security.encoder.bcrypt'];
return $encoder->encodePassword($rawPassword, $salt);
});
You can’t perform that action at this time.