Some Emacs Magit useful commands

Magit is the famous git client for emacs. Like many tools in emacs, it is very versatile and can do more than one thing. Here is a list of some useful command that can save time on a daily basis. Commit history Direct command M-x magit-log-current Status Buffer l l Commit history for other branch Direct command M-x magit-log-other Status Buffer l o Create new branch from changes Useful when you forgot to switch branches before commiting your work...

March 16, 2022 · 1 min · YS

Random 02 - Maths, DevOps, Covid

Learning Maths Where can you learn math Math Foundations from Scratch is part of a large course on AI, but nice and concise Robotics 501: Mathematics for Robotics for a more unexplored area of maths applied to robotics The Book of Proof - I love this one. If you ever want to understand maths at its roots, I would advise you to read this one. It’s a back to fundamentals where you demonstrate what is a multiplication using set theory and other fun stuff....

February 19, 2022 · 2 min · YS

BASH stuff

Bourne Again Shell is born again :) Pure Bash Bible Open source book on pure bash solutions. Link on Github: Pure Bash Bible ShellCheck Finds bugs in your shell scripts A linter for bash scripts https://www.shellcheck.net/ Bash Guide - Best Practices Because you don’t want people to bash your work wink Bash Guide: Best Practices Bash Pitfall The pitfall guide for bash is really good....

February 17, 2022 · 1 min · YS

Is google analytics becoming illegal in Europe?

In France, recent news are interesting to say the least. The CNIL is the french body on protection of privacy, which is regulating most of the online activities concerning data management. They have recently issue a ruling that practically forbid the use the of Google Analytics. Google Analytics and Data Transfers to the US FR- GDPR - CNIL to forbid a website to use google analytics From their press release:...

February 11, 2022 · 2 min · YS

Google Calendar Emacs Integration

There are multiple way to work with Google Calendar. I choose to not work with the private key thing for now. Instead I will try to use the option working with the .ics format. This should give a relatively universal solution for all kind of calendars. I don’t want a locked-in solution that would work only for Google. (Not that this would very surprising if in the end we find out we have to do something custom because it’s google)...

January 5, 2022 · 3 min · YS

Setting up Katex - Maths in Hugo

So, i had this planned for a while to add some more math content to this blog. Mostly for the content I do in french, where I do a lot of school related content for the kids but also for here, in english, where I will likely need it later when adding content about recommender system and other ML topics. Anyway, figured out that Latex is the way to go usually when you want to do some maths in a paper, and well, turns out there is a library for this name Katex and it’s super simple to integrate in Hugo....

December 14, 2021 · 2 min · YS

Zen of python

A known thing - I am just posting this here as a reference Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren’t special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess....

December 12, 2021 · 1 min · YS

Keep secrets in python

Keeping Secrets Secret in Python Based on an article by originally published by Jason Goldberger but unfortunately the original is not online anymore so I have rewritten a short version, since this is something I have been looking for a while. Fernet has one classmethod called generate_key() and two instance methods encrypt(plaintext_binary) and decrypt(cipher_binary). Step 1 : Generate a key Generate a key and save it to the OS’s environment variables:...

November 14, 2021 · 1 min · YS

How to remove Traefik from K3S

When you install k3s it automatically come with Traefik installed. Traefik is great but if you need to work with an other ingress, you might want to remove it. Here is how: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 # Remove traefik helm chart resource sudo kubectl -n kube-system delete helmcharts.helm.cattle.io traefik # Stop the k3s service sudo service k3s stop # add option to add to ExecStart "--no-deploy traefik \" sudo echo '--no-deploy traefik \' >> /etc/systemd/system/k3s....

October 16, 2021 · 1 min · YS

Kubernetes Building Blocks

Kubernetes has multiple moving parts. Here is an short article aiming at mapping all this to create some clarity. Some Basic Vocabulary Nothing fancy but let’s get this out of the way. Nodes A node can be a physical machine or a virtual machine. Cluster A cluster is a group of nodes Container runtime Docker (or runC) Pod A pod is a group of containers - that together form a logical application....

October 15, 2021 · 3 min · YS

Golang pretty print

A quick snippet to get some nicer debug of json and other mapped values. 1 2 3 4 5 6 7 8 //PrettyPrint print any interface func PrettyPrint(data interface{}) (err error) { indentedData, err := json.MarshalIndent(data, "", " ") if err == nil { fmt.Println(string(indentedData)) } return }

October 11, 2021 · 1 min · YS

A Web Of Solutions - October 2021

A refactored digest of my reading of the month. A short introduction to give a bit of context : I have been looking for a way to share on a regular basis some of my learnings. I tend to go through a pretty large amount of content as part of my work and in general. So here I will try to provide it as a structured digest. The goal is to provide an interesting selection of content both practical and conceptual to help advancing how to use tech to solve real problems....

October 10, 2021 · 3 min · YS

Startup financing - advices from a lawyer

Startup financing from a lawyer

October 1, 2021 · 3 min · YS

Printer business

We have a bone to pick with the printer industry. Today, you can litteraly print anything… … as long as it is not on paper. You can 3D print your own laptop parts or even a 3D chocolate cake. But If you dare to print a black and white A4, then, it’s suddenly it’s super high tech… Ink Cartridges Are A Scam An ink cartridge cost about 1$ but is sold up to 100 time its original cost....

August 24, 2021 · 2 min · YS

Python and combinatory

Problem Find all the combination of two in a team Solution 1 2 3 4 5 6 7 from itertools import combinations team = ["john", "joe", "bob", "al", "tony", "mark"] comb = combinations(team, 2) for i in list(comb): print(i) Result: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ('john', 'joe') ('john', 'bob') ('john', 'al') ('john', 'tony') ('john', 'mark') ('joe', 'bob') ('joe', 'al') ('joe', 'tony') ('joe', 'mark') ('bob', 'al') ('bob', 'tony') ('bob', 'mark') ('al', 'tony') ('al', 'mark') ('tony', 'mark') Let’s up the game now we want to arrange the combinations results in a way that none of these guys are on call twice in a row...

August 22, 2021 · 2 min · YS

Weekly Review: Education Unboxed, Google Jupyter, and unrelated

Ok this is an experimental post. I realised I collect a lot of information during the week. I don’t have the time to make sense of it immediately, in a way that would be deep, and reasonate with the global zeigest… So, instead of pilling drafts on my drive, I decided to publish it as a weekly review of the stuff I collect. and will later, if time allow, get back to it....

August 16, 2021 · 3 min · YS

Setup a command line app in python

Goal Setup a basic command line package in python. Package Git: https://github.com/pallets/click/ Doc: https://click.palletsprojects.com/ Let’s get to it Create a virtual environnement. 1 2 python -m venv my_env . my_env/bin/activate Then the setup.py file: (require setuptools) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 from setuptools import setup setup( name='myapp', version='1.0', py_modules=['myapp'], install_requires=[ 'Click', ], entry_points=""" [console_scripts] myapp=myapp:cli """, ) and the myapp....

August 10, 2021 · 1 min · YS

Using python to work with orgmode and gitlab - Part 1 - Onboarding Users

Since I moved to orgmode I have been trying to make this work with most of my environnment. Since I work with gitlab on a daily basis I thought I would start there first. Libraries Org Parse Git Repo: https://github.com/karlicoss/orgparse Docs : https://orgparse.readthedocs.io/ Org Format Git: https://github.com/novoid/orgformat Convert stuff : pypandoc Git : https://github.com/NicklasTegner/pypandoc Python for Gitlab Git Repo : https://github.com/python-gitlab/python-gitlab Doc : https://python-gitlab....

August 10, 2021 · 3 min · YS

The one thing you need to make your marketing work

Patience. Grit. Perseverance. Borderline Stubbornness. The number one reason people failed, especially when it comes to content marketing and organic reach, is a lack of patience and will try one more time. Statistics will be your first enemy The beauty of digital marketing is that it brings you statistics, and you know pretty much what’s happening with your content, which at the beginning, is not much. It is very tempting to let it go, drop the pace slowly, miss a few milestones until your plans to post daily on your blog are gone, or you let your twitter engagement running at an all time low....

July 14, 2021 · 2 min · YS