Skip to content

Instantly share code, notes, and snippets.

View n-peugnet's full-sized avatar
♻️
doing something

Nicolas Peugnet n-peugnet

♻️
doing something
View GitHub Profile
@n-peugnet
n-peugnet / add-dates-to-bash-prompt.md
Last active May 24, 2023 16:07
simple trick to add dates in bash prompt

Add dates to bash prompt

I think I just found the easiest and cleanest way to add precise dates to my bash prompt:

PS0=">>> \$(date +%T.%3N)\\n$PS0"
PROMPT_COMMAND='echo "<<<" $(date +%T.%3N);'$PROMPT_COMMAND

skip the explanations and see the resluts >>>

Explanations

@n-peugnet
n-peugnet / package.json
Last active April 7, 2020 12:42
webpack typescript ts-loader problem matcher for vscode
{
"scripts": {
"watch": "webpack --watch"
},
"devDependencies": {
"ts-loader": "^5.3.3",
"typescript": "^3.4.4",
"webpack": "^4.24.0",
"webpack-cli": "^3.1.2"
},
@n-peugnet
n-peugnet / c_cpp_properties.json
Last active November 14, 2019 12:05
vscode config for qbittorrent development
{
"configurations": [
{
"name": "qbittorrent",
"includePath": [
"${workspaceFolder}/**",
"/usr/include/x86_64-linux-gnu/qt5/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
@n-peugnet
n-peugnet / DuckDuckGoOnionHtml.png
Last active February 2, 2022 15:44
Visit the following site using Tor Browser then, start typing in the URL bar and click the search icon with a plus sign (Add Search Engine "DuckDuckGoOnion HTML"): https://gist.githack.com/n-peugnet/2a29f97c55fea8ccc3febb40d250545d/raw/616e14b13854cb0addca15e89269142c02dbaca6/index.html
DuckDuckGoOnionHtml.png
@n-peugnet
n-peugnet / 30-touchpad.conf
Created September 29, 2020 19:56
xorg config files for thinkpad x260
Section "InputClass"
Identifier "devname"
Driver "libinput"
MatchIsTouchpad "on"
Option "Tapping" "on"
Option "ClickMethod" "clickfinger"
Option "NaturalScrolling" "true"
EndSection
@n-peugnet
n-peugnet / config.h
Last active October 12, 2020 10:01
dwm files
/* See LICENSE file for copyright and license details. */
#include <X11/XF86keysym.h>
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
static const unsigned int systrayspacing = 2; /* systray spacing */
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
#!/bin/bash
sudo apt install default-jre pup wget
version=$(wget -q https://www.yworks.com/products/yed/release-notes -O- | pup '.section-top > div > p > a > span:first-of-type text{}')
zip=yEd-$version.zip
path=/opt/yed-$version
lapps=$HOME/.local/share/applications
wget -nv https://www.yworks.com/resources/yed/demo/$zip
@n-peugnet
n-peugnet / processing-install-debian.sh
Last active May 1, 2022 10:50
Script to install processing properly on Debian and derivatives
#!/bin/bash
sudo apt install default-jre wget
tag=processing-1283-4.0b8
version=$(echo $tag | cut -d- -f3)
tgz=processing-$version-linux-x64.tgz
path=/opt/processing-$version
lapps=$HOME/.local/share/applications
java=$(readlink /etc/alternatives/java | sed 's#/bin/java##')