Skip to content

Instantly share code, notes, and snippets.

View NicHub's full-sized avatar
😈

NicHub

😈
  • Switzerland
  • 14:17 (UTC +02:00)
View GitHub Profile
#!/usr/bin/env python3
import os
from PIL import Image
def get_file_list():
""" ___ """
@NicHub
NicHub / python-quick-reference.py
Last active October 30, 2021 11:17
Python Quick Reference
#!/usr/bin/env python3
"""
Aide mémoire Python
Ceci est un exemple de docstring.
"""
@NicHub
NicHub / .rcloneignore
Created August 20, 2021 15:52
.rcloneignore
._.DS_Store
.DS_Store
*.FCStd1
*ajeter*
*ajeter*/
*norclone*
*norclone*/
WifiSettings.h
[wW][iI][fF][iI][sS][eE][tT][tT][iI][nN][gG][sS].*
ESPSettings.h
@NicHub
NicHub / rclone-ftp
Last active October 8, 2021 13:35
RCLONE FTP MOBILE PHONE
https://play.google.com/store/apps/details?id=me.zhanghai.android.files
# use bash, not zsh to install
bash
curl https://rclone.org/install.sh | sudo bash
# get .rcloneignore
curl https://gist.githubusercontent.com/NicHub/56c64b1bec61695d2a9e0102ca3232cf/raw/2c4980626588e4f148e861206c995906172cc2c9/.rcloneignore > ~/.rcloneignore
rclone obscure ""
@NicHub
NicHub / .gitattributes
Created May 20, 2021 08:45 — forked from inikitin/.gitattributes
.gitattributes for Unity with case-insensitive Git LFS extension filters
* text=auto
*.cs diff=csharp text
*.cginc text
*.shader text
# Unity YAML
*.anim -text merge=unityyamlmerge diff
*.asset -text merge=unityyamlmerge diff
*.controller -text merge=unityyamlmerge diff

AIDE-MÉMOIRE BASH

Bash Shebang

@NicHub
NicHub / .zshrc
Last active November 6, 2024 11:54
setopt INTERACTIVE_COMMENTS
setopt AUTO_CD
###
# https://gist.github.com/NicHub/878f96c6af153d53a07e7cfe49afddfd
# https://scriptingosx.com/2019/07/moving-to-zsh-06-customizing-the-zsh-prompt/
##
###
# Left prompt
@NicHub
NicHub / python_virtual_environment.md
Last active September 6, 2020 11:34
Python Virtual Environment cheat sheet
"""
lsserial.py
This script lists the serial devices connected in verbose and summarized lists.
It is tested on Python3 only.
If you prefer a single line command, there are some alternatives below.
# Prerequisites
pip install pyserial
"""
Python recursive file search with pattern
"""
import pathlib2
def recursive_file_search_with_pattern(root_path, pattern):
pl_dir = pathlib2.Path(root_path)
file_list = [path.resolve()