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 / 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.

@nicolasrouanne
nicolasrouanne / .git-completion.bash.md
Last active December 16, 2022 15:08
Git and Shell configuration on my local MacOS machine

Git Completion by Git

Add the git-completion feature by copying the original .git-completion.bash from the official Git repository to your system.

@ssaunier
ssaunier / sidekiq.config
Created September 24, 2015 09:30
Running Sidekiq on AWS Elastic Beanstalk (Put that file in `.ebextensions` folder)
# Sidekiq interaction and startup script
commands:
create_post_dir:
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh":
mode: "000755"
owner: root
group: root
@gaearon
gaearon / slim-redux.js
Last active May 5, 2024 15:14
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@treble37
treble37 / step1-testing-elasticsearch.rb
Created February 3, 2015 05:46
Step 1 - Testing ElasticSearch - spec_helper.rb
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause this
# file to always be loaded, without a need to explicitly require it in any files.
#
# Given that it is always loaded, you are encouraged to keep this file as
# light-weight as possible. Requiring heavyweight dependencies from this file
# will add to the boot time of your test suite on EVERY test run, even for an
# individual file that may not need all of that loaded. Instead, make a
# separate helper file that requires this one and then use it only in the specs
@glittershark
glittershark / mock_geocoder.rb
Last active April 12, 2019 09:04 — forked from paveltyk/mock_geocoder.rb
Mock geocoding in Rspec, using the new 'expect' syntax
# 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])
@jimothyGator
jimothyGator / README.md
Last active August 25, 2024 17:37
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/