Skip to content

Instantly share code, notes, and snippets.

View rimiti's full-sized avatar
🚀
Focusing

Dimitri DO BAIRRO rimiti

🚀
Focusing
View GitHub Profile
# opening and closing windows and popovers
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
# smooth scrolling
defaults write -g NSScrollAnimationEnabled -bool false
# showing and hiding sheets, resizing preference windows, zooming windows
# float 0 doesn't work
defaults write -g NSWindowResizeTime -float 0.001
@rimiti
rimiti / README.md
Last active October 26, 2021 09:24
Python dictionary merger (dict_merge)

Dict merge function (deeply)

Example:

import collections.abc

current_lake_configuration = {
    'DataLakeAdmins': [
@rimiti
rimiti / README.md
Last active May 19, 2021 11:41
Install OpenVPN through docker

How to install an OpenVPN server (through Docker)

  1. Create an openvpn folder
mkdir -p ~/openvpn/data
  1. Create the configuration
@rimiti
rimiti / README.md
Last active June 16, 2021 17:35
Parcoursup </> Prise de rendez-vous

API recette:

curl --location --request POST 'https://rdv-cfa-recette.apprentissage.beta.gouv.fr/api/appointment-request/context/create' \
--header 'Content-Type: application/json' \
--data-raw '{
    "idParcoursup": "25229",
    "referrer": "parcoursup"
}'
@rimiti
rimiti / script.js
Created June 23, 2020 14:56
Stream big csv file
const fs = require('fs');
const csv = require('csvtojson');
const csvStream = fs.createReadStream('./file.csv');
const converter = new csv.Converter({});
converter
.fromStream(csvStream)
.subscribe((row) => {
@rimiti
rimiti / NPM_PUBLISH.md
Created December 26, 2019 14:45
To check what it will be publish on npm before publishing

To check what it will be publish on npm before publishing:

npm pack && tar -xvzf *.tgz && rm -rf package *.tgz
@rimiti
rimiti / ipstack.ts
Last active July 31, 2020 13:17
Typescript implementation of ipstack
import axios, { AxiosResponse } from 'axios';
import { config } from '../config';
import { Sentry } from '../libs/sentry';
/**
* @description Ip Stack API response
*/
interface IIpStackResponse {
latitude: number;
longitude: number;
@rimiti
rimiti / example.js
Created October 1, 2019 15:39
Javascript: Creating a custom javascript error
export class RequestError extends Error {
constructor(message, meta = {}) {
super();
this.message = message;
this.meta = meta;
}
}