Skip to content

Instantly share code, notes, and snippets.

View pierrejean-coudert's full-sized avatar

Pierre-Jean Coudert pierrejean-coudert

View GitHub Profile
@pierrejean-coudert
pierrejean-coudert / apis.json
Last active December 13, 2021 09:06
restish
{
"root-api": {
"base": "https://root-api.internal.exoscale.ch/api",
"profiles": {
"default": {
"auth": {
"name": "",
"params": null
}
}
@pierrejean-coudert
pierrejean-coudert / bug.md
Last active August 17, 2021 15:08
invoicing bug

log

{"exception": "Traceback (most recent call last):\n  File \"/app/lib/python3.8/site-packages/confederatio/orgs/management/commands/invoicing_distributors.py\", line 52, in handle\n    fresh_org.invoi
ce(until=until, payer_chain=payer_chain)\n  File \"/usr/lib/python3.8/contextlib.py\", line 75, in inner\n    return func(*args, **kwds)\n  File \"/app/lib/python3.8/site-packages/confederatio/orgs/m
odels.py\", line 2100, in invoice\n    bill_id = self._generate_invoice(\n  File \"/app/lib/python3.8/site-packages/confederatio/orgs/models.py\", line 2211, in _generate_invoice\n    bill.populate(u
sage, start_date=first, end_date=last)\n  File \"/app/lib/python3.8/site-packages/confederatio/bills/models.py\", line 856, in populate\n    assert billing_total == total, (billing_total, total)\nAss
ertionError: (Decimal('10.27000000'), Decimal('-71.59000'))", "message": "invoicing distributors error", "@timestamp": "2021-08-16T03:20:59.014931Z", "@version": 1}
@pierrejean-coudert
pierrejean-coudert / .hyper.js
Created April 15, 2019 08:00
Fichier config Hyper.js with Git Bash on windows
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@pierrejean-coudert
pierrejean-coudert / postgres-brew.md
Created September 30, 2018 20:44 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@pierrejean-coudert
pierrejean-coudert / .gitconfig
Last active November 7, 2018 21:30
Git Alias in GitConfig
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit
s = status -s
c = commit
co = checkout
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
@pierrejean-coudert
pierrejean-coudert / gist:80eb3460dc922e96cf6e
Created December 26, 2015 18:52
Install Mezzanine on Ubuntu
sudo apt-get build-dep python-imaging
sudo apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev python-pip
pip install mezzanine
mezzanine-project myproject
cd myproject
python manage.py createdb
python manage.py runserver
@login_required
def report(request):
end = get_week_dates(datetime.now())[1]
begin = get_week_dates(datetime.now()-timedelta(days=7))[0]
if request.method == 'GET':
data = request.GET.copy()
if data:
form = AgendaForm(data, auto_id = True, initial={'begin':begin, 'end':end})
if form.is_valid():
if 'begin' in form.data and 'end' in form.data:
@pierrejean-coudert
pierrejean-coudert / Vagrantfile
Created March 28, 2012 13:24
Vagrant fabric cuisine experiment
Vagrant::Config.run do |config|
config.vm.define :djangovm do |django_config|
# Every Vagrant virtual environment requires a box to build off of.
django_config.vm.box = "lucid64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
django_config.vm.box_url = "http://files.vagrantup.com/lucid64.box"
# Forward a port from the guest to the host, which allows for outside
@pierrejean-coudert
pierrejean-coudert / Vagrantfile
Created March 28, 2012 11:35 — forked from nathany/Vagrantfile
Vagrant Fabric experiment
Vagrant::Config.run do |config|
config.vm.define :djangovm do |django_config|
# Every Vagrant virtual environment requires a box to build off of.
django_config.vm.box = "lucid64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
django_config.vm.box_url = "http://files.vagrantup.com/lucid64.box"
# Forward a port from the guest to the host, which allows for outside