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 / .pythonrc
Created January 23, 2014 18:52
pythonrc with autocompletion! :)
import atexit
import os
import sys
try:
import readline
except ImportError:
print "Module readline not available."
else:
import rlcompleter
readline.parse_and_bind('tab:complete')
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
@GabLeRoux
GabLeRoux / .editor
Created September 30, 2015 16:32
Atom split selection into lines (Sublime Text's ctrl+shift+l) From https://discuss.atom.io/t/multiple-selections/755/45
'.platform-win32 .editor, .platform-linux .editor':
'ctrl-shift-L': 'editor:split-selections-into-lines'
'ctrl-shift-up': 'editor:add-selection-above'
'ctrl-shift-down': 'editor:add-selection-below'
@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 / _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 / problem.log
Last active March 25, 2018 23:27
VirtualBox is configured with multiple host-only adapters with the same IP "192.168.99.1"
Docker Machine Version: 0.7.0, build HEAD
Found binary path at /usr/bin/docker-machine
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:43433
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
command=start machine=default
Starting "default"...
@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