Skip to content

Instantly share code, notes, and snippets.

View NicHub's full-sized avatar
😈

NicHub

😈
  • Switzerland
  • 04:08 (UTC +02:00)
View GitHub Profile
@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 28, 2023 10:11
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pathlib2
def recursive_file_search_with_pattern(root_path, pattern):
pl_dir = pathlib2.Path(root_path)
file_list = [path.resolve()
@NicHub
NicHub / environments.md
Created December 29, 2019 13:25
Python Conda Managing Environments
@NicHub
NicHub / get_disk_space.py
Last active December 20, 2019 14:54
Get disk space in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Display disk stats
"""
import shutil
total, used, free = shutil.disk_usage("/")
print("DISK SPACE")
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
# Create
conda create --name myenv
conda create -n myenv python=3.7
conda create -n myenv python=3.7 scipy=0.15.0 astroid babel
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Find characters with ASCII code greater than 127.
usage:
cd /DIRECTORY_TO_CHECK/
python /PATH_TO/check_char.py