Skip to content

Instantly share code, notes, and snippets.

View florianpasteur's full-sized avatar

Florian PASTEUR florianpasteur

View GitHub Profile
@florianpasteur
florianpasteur / .bashrc
Last active September 11, 2025 07:36
Bash profile
#!/bin/bash
# START=$(perl -MTime::HiRes=time -e 'printf "%.9f\n", time')
#######################################################
# EXPORTS
#######################################################
# Expand the history size
" URL: https://vim.wikia.com/wiki/Example_vimrc
" Authors: https://vim.wikia.com/wiki/Vim_on_Libera_Chat
" Description: A minimal, but feature rich, example .vimrc. If you are a
" newbie, basing your first .vimrc on this file is a good choice.
" If you're a more advanced user, building your own .vimrc based
" on this file is still a good idea.
"------------------------------------------------------------
" Features {{{1
"
@florianpasteur
florianpasteur / 01-start.gcode
Last active October 22, 2024 17:18
CR-10S Pro Start/End Gcodes
M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration
M203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate
M204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration
M205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
G28 ;Home
M501 ;Load saved bed leveling
M420 S1 ;Save and use mesh
@florianpasteur
florianpasteur / README.md
Created January 17, 2022 14:09
Force AAC bluetooth on mac
@florianpasteur
florianpasteur / README.md
Created March 30, 2022 07:32
Enable touch id for sudo

Enable touch for to sudo

In a terminal run:

cd /etc/pam.d/
sudo vim sudo

Append the following line to the file

@florianpasteur
florianpasteur / post-commit
Last active May 7, 2024 23:31
Post commit hook to increment version of npm package
# Install command:
# curl https://gist.githubusercontent.com/florianpasteur/c9764ddc56042a075662e1adcfbcc0b4/raw -o .git/hooks/post-commit && chmod +x .git/hooks/post-commit
IS_AMEND=$(ps -ocommand= -p $PPID | grep -e '--amend');
if [ -n "$IS_AMEND" ]; then
exit 0;
fi
if git diff package.json package-lock.json; then
@florianpasteur
florianpasteur / post-commit
Last active September 27, 2022 09:10
Post commit hook to increment version of JSON file
#!/bin/bash
# Install command:
# curl https://gist.githubusercontent.com/florianpasteur/f1cc272815f08d133ead0ddd2c21e421/raw -o .git/hooks/post-commit && chmod +x .git/hooks/post-commit
IS_AMEND=$(ps -ocommand= -p $PPID | grep -e '--amend');
if [ -n "$IS_AMEND" ]; then
exit 0;
## FINDER
# show file extension
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# quit options
defaults write com.apple.finder QuitMenuItem -bool true;
@florianpasteur
florianpasteur / index.html
Last active June 24, 2022 14:49
Bootstrap table flexbox only. Based on: https://jsfiddle.net/lowrey/yc4xzx4q/
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<title>Bootstrap 5 Flexbox table</title>
<style>
/* Css not used, as reference only */
.table {
display: flex;
flex-flow: column nowrap;
@florianpasteur
florianpasteur / README.md
Created July 5, 2022 12:16
File to base64 string CLI

File to base64 string CLI on MacOsx and Linux

openssl base64 -in IN_FILE -out OUT_FILE -A

-A: to inline the result in the outfile