aboutsummaryrefslogtreecommitdiff
path: root/cheat
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-09-04 20:30:21 +0200
committerneodarz <neodarz@neodarz.net>2019-09-04 20:41:19 +0200
commitef471a603e754964dde7e6e1074656528f2c2f41 (patch)
treeedd9f00afb3bd7c4ea7449451573b06408d4e4ee /cheat
parentc1c0857f7a816b5b3f10fd3554b8bb9b24d1e193 (diff)
downloaddotfiles_ascii-ef471a603e754964dde7e6e1074656528f2c2f41.tar.xz
dotfiles_ascii-ef471a603e754964dde7e6e1074656528f2c2f41.zip
Add some cheat
Diffstat (limited to '')
-rw-r--r--cheat/.cheat/pypi10
-rw-r--r--cheat/.cheat/python19
-rw-r--r--cheat/.cheat/rust14
-rw-r--r--cheat/.cheat/ssh2
4 files changed, 45 insertions, 0 deletions
diff --git a/cheat/.cheat/pypi b/cheat/.cheat/pypi
new file mode 100644
index 0000000..04c11ad
--- /dev/null
+++ b/cheat/.cheat/pypi
@@ -0,0 +1,10 @@
+More about packaging:
+https://packaging.python.org/tutorials/packaging-projects/
+
+# generated package
+
+python setup.py sdist bdist_wheel
+
+# upload package
+
+python -m twine upload dist/*
diff --git a/cheat/.cheat/python b/cheat/.cheat/python
index 4428b48..7c8f0b2 100644
--- a/cheat/.cheat/python
+++ b/cheat/.cheat/python
@@ -42,3 +42,22 @@ tuple
# mutable (modifiable)
bytearray
+
+# For bytes and bytearray show hex value of each char
+[hex(i) for i in header]
+
+# For string show hex value of each char
+[hex(ord(c)) for c in header]
+
+# Opencv with gstreamer
+# Gstreamer not on pipy but present when building...
+
+git clone --recursive https://github.com/skvark/opencv-python.git
+git checkout -b 25
+ENABLE_CONTRIB=ON python setup.py install
+
+# package developement
+
+virtualenv .venv_dev
+source .venv_dev/bin/activate
+pip install -e . # for install package in dev mode
diff --git a/cheat/.cheat/rust b/cheat/.cheat/rust
index 0a493b0..41406ca 100644
--- a/cheat/.cheat/rust
+++ b/cheat/.cheat/rust
@@ -35,3 +35,17 @@ Un type "compound" regroupe différent type de valeurs en une seul.
- Tuple (multi type) ex: (1, 'z', 0.9)
- Array (same type) ex: [1, 2, 3]
+
+# outils
+
+voir pour `rustup` pour gérer cargo
+
+# components
+
+## clippy
+
+linter permer de donner des conseils en plus du compilateur
+
+## format
+
+permet de suivre les convetions de style
diff --git a/cheat/.cheat/ssh b/cheat/.cheat/ssh
index b422ae6..d667af4 100644
--- a/cheat/.cheat/ssh
+++ b/cheat/.cheat/ssh
@@ -50,3 +50,5 @@ ssh-keygen -t rsa -C "your_email@example.com" -P "" -q -f ~/.ssh/gitlab_rsa
ssh-keygen -t ed25519
ssh-keygen -t ed25519 -C "user@example.com" -q -f ~/.ssh/user@example.com
+
+ssh-copy-id -i ~/.ssh/id_dsa.pub user@machine