Skip to content

Instantly share code, notes, and snippets.

View aurelienpierre's full-sized avatar
🚣‍♂️
I may be slow to respond.

Aurélien PIERRE aurelienpierre

🚣‍♂️
I may be slow to respond.
View GitHub Profile
@aurelienpierre
aurelienpierre / Image optimize
Created January 19, 2014 08:42
A simple script which applies non-destructive optimization algorithms on png and jpg files in order to adjust size vs quality. It proceeds every file in a directory. Linux only. It can easily be added in Nautilus through Nautilus-Actions.
#!/bin/bash
# Required commands :
# - optipng
# - jpegoptim
# optipng (non destructive)
optipng *.png
optipng *.PNG
@aurelienpierre
aurelienpierre / Touch switch
Last active January 4, 2016 15:29
Configure a Wacom Intuos (tablet) button touch switch - call this script through a special keystroke
#!/bin/bash
## Get the "Device name" or ID number
## for touch from 'xsetwacom list dev'
DEVICE="Wacom Intuos PT M Finger touch"
TOUCH_STATE=`xsetwacom get "$DEVICE" touch`
if [ "$TOUCH_STATE" == "on" ]
then
echo "Touch is ON, turning OFF."
@aurelienpierre
aurelienpierre / Wacom Intuos Configuration
Last active May 15, 2016 12:41
Manualy assign buttons configuration to Wacom Intuos Tablet. Save this into /usr/bin/tablette.sh
#!/bin/bash
export LANG="fr_FR.UTF-8"
## Pad
PAD="Wacom Intuos PT M Finger pad"
xsetwacom set "$PAD" Button 3 "key Ctrl Super T" #up left button ## configured as touch switch - Ctrl Super T is set to call Touch switch script in the OS
xsetwacom set "$PAD" Button 1 "key super" #bottom left button ## configured as "Menu"
xsetwacom set "$PAD" Button 9 "key Ctrl Z" #top right button ## configured as "Undo"
xsetwacom set "$PAD" Button 8 "key Ctrl Y" #bottom right button ## configured as "Redo"
@aurelienpierre
aurelienpierre / Wacom Intuos Tablet udev configuration
Created January 26, 2014 23:24
Run the configuration script '/usr/bin/tablette.sh' when a Wacom Intuos is plugged. You have to save this command into /etc/udev/rules.d/90-wacom.rules
ACTION=="add", ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0303", RUN+="/usr/bin/tablette.sh"
@aurelienpierre
aurelienpierre / Winetricks
Last active May 30, 2017 23:02
Creates a complete fake Windows 7 installation within a Wine Prefix in one command
#!/bin/bash
winetricks ie8 wmp10 allcodecs d3dx11_43 dotnet40 vc2005 vc2008 dsound ogg allfonts hosts ddr=opengl fontsmooth=rgb videomemorysize=2048 win7 glsl=enabled ao=enabled rtlm=auto psm=enabled mwo=force fontsmooth=rgb vsm=hardware
@aurelienpierre
aurelienpierre / Wine NVIDIA config
Created February 2, 2014 23:00
Regedit keys to configure NVIDIA graphics with Wine
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\Direct3D]
"DirectDrawRenderer"="opengl"
"Nonpower2Mode"="repack"
"OffscreenRenderingMode"="fbo"
"RenderTargetLockMode"="auto"
"UseGLSL"="readtex"
"VertexShaderMode"="hardware"
"VideoDescription"="NVIDIA GeForce 635M GT"
@aurelienpierre
aurelienpierre / powertop
Last active December 29, 2015 18:07
Powertop Daemon
#! /bin/sh -e
DAEMON="/usr/sbin/powertop" #ligne de commande du programme
DEAMON_OPT="--auto-tune" #argument à utiliser par le programme
DAEMONUSER="root" #utilisateur du programme
DEAMON_NAME="powertop" #Nom du programme (doit être identique à l'exécutable)
PATH="/sbin:/bin:/usr/sbin:/usr/bin" #Ne pas toucher
test -x $DAEMON || exit 0
@aurelienpierre
aurelienpierre / darktable.css
Created December 1, 2016 18:33
Darktable 50% grey stylesheet
@define-color bg_color #7C7C7C;
@define-color plugin_bg_color #333;
@define-color fg_color #eee;
@define-color base_color #444;
@define-color text_color #eee;
@define-color selected_bg_color #666;
@define-color selected_fg_color #eee;
@define-color tooltip_bg_color #BEBEBE;
@define-color tooltip_fg_color #111;
@define-color really_dark_bg_color #595959;
@aurelienpierre
aurelienpierre / lagrange.py
Last active December 8, 2022 10:44
[Python] Computes the symbolic expression of the Lagrange interpolation polynomial and evaluates the function if needed
from sympy import *
from sympy.matrices import *
import numpy
import pylab
import warnings
def Lagrange_interpolation(points, variable=None):
"""
Compute the Lagrange interpolation polynomial.
This file has been truncated, but you can view the full file.
____________________________________________
Start of NVIDIA bug report log file. Please include this file, along
with a detailed description of your problem, when reporting a graphics
driver bug via the NVIDIA Linux forum (see devtalk.nvidia.com)
or by sending email to 'linux-bugs@nvidia.com'.
nvidia-bug-report.sh Version: 23400452
Date: mardi 10 +avril 2018, +14:03:26 +(UTC-0400)