Skip to content

Instantly share code, notes, and snippets.

@bestwebua
bestwebua / multiple-repository-and-identities-git-configuration.md
Created September 10, 2024 08:18 — forked from bgauduch/multiple-repository-and-identities-git-configuration.md
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@bestwebua
bestwebua / upgrade26.md
Created November 30, 2020 10:54 — forked from tgaff/upgrade26.md
ruby 2.3 to 2.6 upgrade

local

brew upgrade ruby-install
ruby-install ruby 2.6.5

install bundler 2.1.4 (may not be necessary)

Depending on ruby version manager (rvm/chruby/rbenv) you may need to change directories or select ruby 2.6.5 then

{
"subscription": {
"title": "Some Title",
"start_date": "2020-06-05T14:32:57Z",
"end_date": "2020-06-05T14:32:57Z",
"quantity": 1,
"type": "some type",
"unit_price": "42.42",
"amount": "42.42"
},
@bestwebua
bestwebua / active_admin.rb
Created September 2, 2018 12:49 — forked from llxff/active_admin.rb
Using devise + activeadmin with one User model and separate sign_in entry points
config.authentication_method = :authenticate_admin_user!
config.current_user_method = :current_admin_user
config.logout_link_path = :destroy_user_session_path
@bestwebua
bestwebua / howto.bash
Last active April 28, 2019 18:00
Rails + PostgreSQL
sudo apt-get install postgresql libpq-dev cmake
sudo -u postgres createuser --interactive
sudo -u postgres createdb [your_rails_project]_development
sudo -u postgres createdb [your_rails_project]_test
sudo service postgresql restart
ps -ax | grep postg
rails s
@bestwebua
bestwebua / scraping_kata.rb
Last active April 6, 2018 13:22
Scraping kata
require 'nokogiri'
require 'open-uri'
class User
attr_reader :name, :clan, :honor
def initialize(name, clan, honor)
@name, @clan, @honor = name, clan, honor
end