Skip to content

Instantly share code, notes, and snippets.

View gildas-ld's full-sized avatar

Gildas Le Drogoff gildas-ld

View GitHub Profile
@pystardust
pystardust / pdf_contrast.py
Created May 1, 2022 21:09
Change contrast of pdf using python
"""
# pdf_contrast.py
Modify contrast of pdf
## Install
```
pip install Pillow pdf2image img2pdf tqdm
```
> Save this file as pdf_contrast.py
@sindresorhus
sindresorhus / esm-package.md
Last active April 26, 2025 12:29
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@salkin-mada
salkin-mada / app_launcher_window_switcher.md
Last active January 1, 2024 07:27
fzf/skim app launcher + window switcher using kitty/alacritty

.

Here follows a simple example using sway. Scripts and locations can/should be modified for your needs and layout can be changed to whatever likings. export FZF / SKIM default envir vars can also change behavior in addition to local fzf/skim --flags during command or scripting will override defaults. Go nuts.

  • in sway/config
# Preferred application launcher
# fzf launcher
set $fzf_launcher kitty --config \"$HOME/.config/kitty/fzf-launcher.config\" --class fzf-launcher --detach
@rufoa
rufoa / patch.sh
Last active April 24, 2025 15:53
sublime merge 2 build 2068 linux
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
target="${1:-/opt/sublime_merge/sublime_merge}"
check_sha() {
local sha_valid
@estorgio
estorgio / prettier-eslint-precommit.md
Last active December 17, 2024 10:58
Setting up Prettier and ESLint with pre-commit hook

Setting up Prettier and ESLint with pre-commit hook

  • Initialize Git repository
    git init
  • Create .gitignore file and add the following:
    node_modules/
    *.env
    
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active April 22, 2025 11:58
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@sergeyklay
sergeyklay / journalctl-cheatsheet.md
Last active April 8, 2025 04:54
Journalctl Cheat Sheet

Journalctl Cheat Sheet

Configuration

Permissions

To see messages from other users and the system as well as performing various log operations from a regular user add it to the group:

sudo usermod -aG systemd-journal $USER
@tuxPT
tuxPT / sway-config
Last active April 23, 2025 06:40
sway config
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
exec wal -R
#notifications
exec mako
exec mailnag
@tomsihap
tomsihap / sakila-db-exercises.sql
Last active September 24, 2024 08:50
Sakila DB Exercises
# __
# .--------.--.--.-----.-----.| |
# | | | |__ --| _ || |
# |__|__|__|___ |_____|__ ||__|
# |_____| |__|
#
# e x e r c i s e s
# Important: Remember to add a semi-colon at the end of each query.
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active April 28, 2025 18:45
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com