Skip to content

Instantly share code, notes, and snippets.

View maxgfr's full-sized avatar
🎯
Focusing

Maxime Golfier maxgfr

🎯
Focusing
View GitHub Profile
@maxgfr
maxgfr / data_loaded_tensorflow.py
Last active March 8, 2018 09:47
Load data on tensorflow
"""
From Jeremie :)
"""
from __future__ import print_function
import numpy
import tensorflow as tf
rng = numpy.random
@maxgfr
maxgfr / laradock.md
Last active September 13, 2022 04:29
Laradock with Laravel / Laravel with Laradock

Laradock X Laravel

Initialize

1) In .env of laravel app, add :

DB_HOST=mysql

REDIS_HOST=redis
@maxgfr
maxgfr / 0-install.md
Last active January 2, 2022 22:39
Hyperledger X Ubuntu : Single Organization

Hyperledger X Ubuntu : Single Organization

AFTER A REBOOT

sudo reboot
ssh -i ....
nvm use 8
sudo systemctl restart docker
sudo ~/fabric-dev-servers/./startFabric.sh 
cd ~/blockchain-container/dist/
@maxgfr
maxgfr / twitch_react_native.js
Created November 27, 2018 16:01
Twitch library using react-native (expo)
import { AsyncStorage } from 'react-native';
import { WebBrowser, AuthSession } from 'expo';
import {
TWITCH_CLIENT_ID,
TWITCH_SECRET_ID
} from 'react-native-dotenv'
const TWITCH_REDIRECT_URI= AuthSession.getRedirectUrl();
const TWITCH_BASE_URL="https://api.twitch.tv/kraken/";
@maxgfr
maxgfr / path.md
Last active January 2, 2022 22:32
Add to path to mac os

Add path to mac os

echo $PATH;

If we want to add $HOME/.composer/vendor/bin to the path, we should run :

export PATH=$PATH:$HOME/.composer/vendor/bin  
@maxgfr
maxgfr / remove_all_docker_container.md
Last active January 2, 2022 22:31
Remove all docker container

Remove all docker container

docker system prune
# Stop all containers
docker stop `docker ps -qa`
@maxgfr
maxgfr / configure_libnfc.md
Last active December 2, 2022 22:17
How to configure libnfc ACS ACR122U on Mac OS X ?

Configure libnfc ACS ACR122U on Mac OS X

git clone https://github.com/nfc-tools/libnfc.git
cd libnfc 
autoreconf -is 
./configure --with-drivers=acr122_pcsc
make install
@maxgfr
maxgfr / erase_usb_stick.md
Last active December 2, 2022 22:16
Erase a USB stick format on mac os

Erase a USB stick format on mac os

sudo diskutil eraseDisk FAT32 MAX_USB disk2
@maxgfr
maxgfr / copy_html.js
Last active December 2, 2022 22:18
Copy HTML page in local with nodejs
const URL = ""
const rp = require('request-promise');
const fs = require('fs');
rp(URL).then(function(html){
fs.writeFile("./res.html", html, function(err) {
if(err) {
return console.log(err);
}
console.log("The file was saved!");
@maxgfr
maxgfr / socket_express_react.js
Last active April 8, 2020 16:02
Socket.io + Express JS + React JS
var socket = require('socket.io');
var express = require('express');
var app = express();
var path = require('path');
app.use(express.static(path.join(__dirname, 'build')));
app.get('/*', function(req, res) {
res.sendFile(path.join(__dirname, 'build', 'index.html'));
});