Skip to content

Instantly share code, notes, and snippets.

function getToken() {
if (!pm.environment.get('accessTokenExpiry') ||
!pm.environment.get('accessToken')) {
console.log('Access token or expiry date are missing, login in to api')
return true
} else if (pm.environment.get('accessTokenExpiry') <= (new Date()).getTime()) {
console.log('Access token is expired, login in to api')
return true
} else {
console.log('Access token is still valid')
@lebrunthibault
lebrunthibault / kessel.py
Created July 20, 2022 15:15
kessel utility scripts
"""format emails for sending via {{prod}}/bo/actions/send_newsletter?post_id=id"""
import json
import sys
import pyperclip
from loguru import logger
with open("./emails.csv", "r") as f:
emails = [email[0:-1] for email in f.readlines()]
// ==UserScript==
// @name Hide links on lemonde.fr
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hide links on lemonde.fr
// @author You
// @match https://www.lemonde.fr/*
// @require https://gist.githubusercontent.com/lebrunthibault/a09b9344ddd86c764d383cdd1085b7c7/raw/tampermonkey.js?cachebust=dkjflskjfldkf3
// @icon https://play-lh.googleusercontent.com/aN_UGrgEUuShQGFMU1Kuhwy2cCU6CL9spKqAyP4MREEPzJuqrxvKQGPqPAyrshjmZM0=s180-rw
// @grant none
# cd in folder
$files = Get-ChildItem . -File "*.m4a"
foreach ($f in $files) { ffmpeg -i $f.name ($f.name.split(".")[0] + ".mp3") }
# install zsh
sudo apt-get update
sudo apt-get install -y curl zsh tmux vim git make terminator gitk htop python3-pip xclip wmctrl
sudo snap install postman
sudo snap install --classic heroku
# oh-my-zsh
rm -rf .oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"