Skip to content

Instantly share code, notes, and snippets.

View Ludorg's full-sized avatar
🦀

Ludorg Ludorg

🦀
View GitHub Profile
@Ludorg
Ludorg / pre-commit
Last active July 27, 2019 05:50
pre-commit hook for git to update automatically first occurence of comments data '* Date:', '* Modified by:' and '* File:' in all commited files
#!/bin/bash
echo Running $BASH_SOURCE
#set | egrep GIT
echo PWD is $PWD
# In a C/C++ file formatted like below, update these information (first occurence)
#
#/*
@Ludorg
Ludorg / ludovic_20000.py
Last active April 18, 2020 09:06
20000 days
from datetime import date
from datetime import timedelta
today = date.today()
ludovic = date(1974, 9, 17)
vingtmille = ludovic + timedelta(20000)
print("20000 jours Ludovic : ", vingtmille)
# prints 2029-06-20 :)
@Ludorg
Ludorg / apod.py
Last active May 3, 2020 21:36
Get NASA "Astronomy Picture of the Day"
# Get "Astronomy Picture of the Day" automatically from https://apod.nasa.gov/
# Saved file is today-date(YYYY-MM-DD) + filename (example: 2020-04-28_Kepler90Illustration_Kepler_1080.jpg)
# Requires:
# - lxml
# - requests
# - beautifulsoup4
import requests
from bs4 import BeautifulSoup
from datetime import date
@Ludorg
Ludorg / L298N_README.md
Last active May 4, 2021 01:55
Simple use of L298N Motor driver with two BBC micro:bit (1 for Motor Control, 1 for Remote Controler )

Simple use of L298N Motor driver with two BBC micro:bit (1 for Motor Control, 1 for Remote Controller )

Twitter Follow

Requirements

Hardware

  • 2 BBC micro:bit (see store)
  • 1 Motor Drive Controller L298N (I bought mine on Amazon.fr)
@Ludorg
Ludorg / lockdown_duration.py
Created June 2, 2020 05:22
80 days at home
from datetime import date
start = date(2020, 3, 13)
end = date(2020, 6, 1)
diff = end - start
print("lockdow duration=", diff)
@Ludorg
Ludorg / notes_wandboard_rust.md
Last active March 8, 2024 12:30
Notes about Wandboard use with Rust

Notes about testing Rust on a Wandboard

About Wandboard

The Wandboard is a Cortex-A9 ARM device sporting a single, dual, or quad core Freescale i.MX6 SoC

Source: http://www.armhf.com/boards/wandboard/

Installing Linux on Wandboard