Skip to content

Instantly share code, notes, and snippets.

View Alphare's full-sized avatar

Raphaël Gomès Alphare

  • Octobus
  • France
View GitHub Profile
@Alphare
Alphare / import_guitar.js
Last active February 28, 2019 08:54
Price of importing a guitar from outside the US into France
const DOLLARS_TO_EURO = 0.88;
const CUSTOMS_TAX_PERCENTAGE = 3.2;
const VAT_PERCENTAGE = 20;
const getTtc = price => {
// price in USD
price = DOLLARS_TO_EURO * price;
const customs = (CUSTOMS_TAX_PERCENTAGE * price / 100);
const vat = (VAT_PERCENTAGE * price / 100);
@Alphare
Alphare / itemattrgeter_compositon.py
Last active May 3, 2017 13:17
Horrible way of mixing itemgetter and attrgetter that I used once
"""
Of course, this is not real code apart from the core functionality
"""
from __future__ import unicode_literals
from functools import reduce as functools_reduce
from operator import attrgetter, itemgetter
class DummyItem:
def __init__(self):
@Alphare
Alphare / setup.reg
Created March 25, 2017 10:43
Fix for the "Unable to find language registry keys" for Rallisport Challenge
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft Games\RalliSport Challenge\1.0]
;New
"LangID"=dword:00000009