Skip to content

Instantly share code, notes, and snippets.

View GabLeRoux's full-sized avatar
:shipit:
Shipping code for humans ✌

Gabriel Le Breton GabLeRoux

:shipit:
Shipping code for humans ✌
View GitHub Profile
@GabLeRoux
GabLeRoux / .env.example
Last active February 12, 2024 15:40 — forked from HeshamMeneisi/docker-compose
Mount S3 as Docker Volume (docker-compose)
AWS_S3_BUCKET=
AWS_S3_ACCESS_KEY_ID=
AWS_S3_SECRET_ACCESS_KEY=
@GabLeRoux
GabLeRoux / ReadMe.md
Created July 31, 2019 01:35
Convert OPENSSH to RSA from command line

Convert openssh keys to rsa keys

from something that starts with

-----BEGIN OPENSSH PRIVATE KEY-----

to something that starts with

@GabLeRoux
GabLeRoux / _service.md
Created May 30, 2018 20:13 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@GabLeRoux
GabLeRoux / how-to-add-ssh-key-to-remote-host.md
Last active September 5, 2018 18:49
Generate a new ssh key and add it to remote server's authorized_keys

1. Generate yourself a new ssh key

# Generate new ssh key (from github)
# https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
ssh-keygen -t rsa -b 4096 -C "email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/EXAMPLE_rsa
@GabLeRoux
GabLeRoux / aws-attach-AWSElasticBeanstalkMulticontainerDocker-to-elasticbeanstalk.sh
Created March 22, 2018 15:14
Attach AWSElasticBeanstalkMulticontainerDocker to elasticbeanstalk's aws-elasticbeanstalk-service-role from command line
# example using profile in ~/.aws/config
aws --profile some-profile-name \
iam attach-role-policy \
policy-arn arn:aws:iam::aws:policy/AWSElasticBeanstalkMulticontainerDocker \
--role-name aws-elasticbeanstalk-service-role
@GabLeRoux
GabLeRoux / why-i-hate-php.md
Last active January 22, 2018 05:53
One of the reasons why I don't like PHP

nope.php:

<?php

echo "some undefined variable" + $undefined_shit;
echo "please don't print";
php nope.php
@GabLeRoux
GabLeRoux / Rails-add-user-in-rails-console.md
Last active November 4, 2017 19:05 — forked from tacettin/Rails add user in rails console
Rails add user in rails console

This is quite a 'classic' problem and the immediate thought ("just do it mySQL") doesn't work here because of the need to have the rails piece that encodes a password that is entered.

So you need to actually use rails, something like this (this should all be happening in your local development environment which is the default when working locally):

You need to create a user.

Try this:

cd the_root_of_the_project
@GabLeRoux
GabLeRoux / how-to-jupyter.md
Last active July 17, 2020 19:51
Use jupyter to take python notes, share and embed them <3

Installation

You'll need jupyter and some tools to draw plots :)

pip3 install jupyter
pip3 install matplotlib numpy pandas
jupyter notebook