Skip to content

Instantly share code, notes, and snippets.

View nicolasrouanne's full-sized avatar

Nicolas Rouanne nicolasrouanne

  • Software Engineer
  • Marseille, France
View GitHub Profile
@nicolasrouanne
nicolasrouanne / NGINX.md
Last active June 19, 2020 13:30
nginx on Mac OS

NGINX

Set up nginx on Mac OS

Installation

Install nginx with Homebrew:

brew install nginx

Start nginx as a brew service:

Workflow

We are using the Github flow, which is mainly:

  • one master branch that is always production ready and in a deployable state 🛰️
  • one branch by feature or bug - a.k.a. feature branch
  • make a Pull Request (PR) on master for your feature / bug fix to be merged and go in production 🚀

No overhead

@nicolasrouanne
nicolasrouanne / .zshrc
Last active April 24, 2024 09:02
zsh configuration file
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/nicolasrouanne/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@nicolasrouanne
nicolasrouanne / Git_Pro_cheatsheet.md
Last active November 6, 2019 10:25
Git Pro cheatsheet

Git Pro cheatsheet

Rewriting history

git commit --amend # edit last commit
git commit --amend --no-edit # edit last commit w/o changing commit message

Undoing git stuff

When you make a mistake (e.g. a hard reset to a previous commit, losing important work), you can always undo your changes made with git, even when it seems irrevocaly lost

@nicolasrouanne
nicolasrouanne / blog.md
Last active January 17, 2019 14:20
Deployment on AWS Elastic Beanstalk

Context

AWS Elastic Beanstalk is the Platform As A Service solution by AWS. It is thought as a replacement for Heroku wich is great 🙌 but can become very expensive 💰 when the project is growing or in need of real performance 🏎.

Google App Engine comparison

Google Cloud also has its Platform As A Service product, Google App Engine. However very promising and notably simpler than AWS Elastic Beanstalk, we have been experiencing serious issues while testing it:

  • downtime in deployment 🚧: when deployong a new version of the app, it often becomes unreachable (5xx errors) for up to a whole minute.
  • veeeery long deploys ⬆️ ⏲: it takes on average 8 to 10 minutes ⏳ waiting for a new version of the application to deploy. Compared to a few seconds on Heroku and a few minutes on Elastic Beanstalk. We found out that it truly harmed our development wor
@nicolasrouanne
nicolasrouanne / VSCODE_LAUNCH.md
Last active January 28, 2022 22:43
VS Code configuration: settings & debugger config (Ruby, React)

VS Code launch.json configurations

VS Code launch.json file serves as a debugging configuration file.

Introduction

Where to put it

It must be stored in PROJET_ROOT/.vscode/launch.json.

Should I commit it?

Though opinions vary, it is not recommended to commit such files in source control. It is specific to every developer, and commiting it would prevent each developer to configure it according to his needs.

{
"included": [
{
"id": "1",
"type": "boat_model",
"attributes": {
"name": "Demacia",
"boat_type": "sailboat",
"loa": 16.63,
"beam": 1.23,
@nicolasrouanne
nicolasrouanne / mock_geocoder.rb
Last active March 5, 2018 09:48 — forked from glittershark/mock_geocoder.rb
Mock geocoding in Rspec, with _specifics for `Google Geocoding API`
# In spec_helper:
# RSpec.configure do |config|
# ...
# config.include(MockGeocoder)
# end
#
# In your tests:
# it 'mock geocoding' do
# # You may pass additional params to override defaults
# # (i.e. :coordinates => [10, 20])
@nicolasrouanne
nicolasrouanne / SIGNING_COMMITS.md
Last active June 2, 2021 19:25
Set up GPG commit signing for Github

Signing Commits

Signing commits is a way to authenticate your commits, since anybody can pretend using your email when pushing to a repository (as long as one has access to it)

Initial set up

Create or import a GPG Key

Create a GPG Key

First you need to create a GPG Key Pair. Follow Github guide explaining each step: Generating a new GPG Key

Do not forget to add the passphrase to your favorite password manager (1Password for instance 🔒👌)

@nicolasrouanne
nicolasrouanne / Perl.md
Last active July 29, 2020 21:19
Perl cheatsheet

Pearl cheatsheet

Perl should be installed on Mac OS using Brew

$ brew install perl

If perl is already installed, this will throw an error. You should then install perl with perlbrew. Perlbrew is a versions environment for Perl, such as rbenv for ruby and nvm for node. See a complete guide for perlbrew.