Boot Raspberry Pi Model 3B V1.2 on SSD

Written by pmd - - no comments

I have a Raspberry Pi Model 3B V1.2. You can know your model by typing in prompt :

$ pinout
,--------------------------------.
| oooooooooooooooooooo J8     +====
| 1ooooooooooooooooooo        | USB
|                             +====
|      Pi Model 3B  V1.2         |
|      +----+                 +====
| |D|  |SoC |                 | USB
| |S|  |    |                 +====
| |I|  +----+                    |
|                   |C|     +======
|                   |S|     |   Net
| pwr        |HDMI| |I||A|  +======
`-| |--------|    |----|V|-------'

In January 2022, the microSD card got corrupted, and Pi was not reliable anymore, after about 3 years of operation.
I bought a new microSD card but as I didn't backup, I had to reinstall all over again. Not a nice feeling.

As of 23/03/2022 I am preparing to configure the Pi to boot on an SSD.

I bought two things so far:

As of 28/12/2022 I red a lot, and nothing worked, until I found something that work pretty nicely.

What I have finally setup

  1. Raspberry Pi is operationnal. Currently running based on the SD Card (FYI 32GB) inserted in the SD Card slot of the Pi.
     
  2. Using SD Card Copier already available in Raspian, I made a clone from the SD Card to the SSD:

     
  3. On your SSD, you should then have 2 partitions, one for boot and one for the OS.
    I formatted another SD Card (FYI 2GB) and I formatted it in FAT32.
    Then, I have made a copy of all the files that were in the boot partition of the SSD to this other 2GB SD Card.
     
  4. I properly switched off the Raspberry Pi.
    I removed the SD Card 32GB from the SD slot that was previously running the system.
    I inserted the SD Card 2GB which contains all the files from the boot partition of the SSD.
    I connected another USB device: a Toshiba HDD 2 TB.
    Everything is powered with the Raspberry Pi 3 Power Supply - 2.5A (Micro USB) by CanaKit. No any USB hub to power the SSD or HDD.

I am a bit concerned about the power. So I will monitor this in the coming days using two commands:

$ vcgencmd get_throttled
throttled=0x0
$ dmesg | grep -iC 3 "under-voltage"

See here for get_throttled signification.

Travaux maison

Written by pmd - - no comments

Plomberie - la base

▶️ DJ. PLOMBERIE - JE VOUS EXPLIQUE LES RACCORDS DE PLOMBERIE

Pour le tuyau de cuivre plusieurs diamètres (extérieurs): 12 - 14 - 16 - 18 - etc...

Il y a pour une maison 3 tailles de pour les raccords:

  ⌀ intérieur - extérieur (mm)
petit 3/8 12 - 17
moyenne 1/2 15 - 21
grand 3/4 20 -27

7min10sec : souvent du compteur jusqu'à la maison les plombiers mettent du PE en 25
https://www.manomano.fr/cat/tuyau+pe+25+mm

Le PE rentre dans un raccord PE 25 en entrée, puis une vanne, et en sortie un écrou 3/4.
8min35sec : Il met un mamelon male-male puis un raccord 2-pièces à écrou prisonnier 3/4 vers tuyau de cuivre 18.

9min51sec : plusieurs solutions:

  1. tuyau, des T, des coudes et on va vers les éléments
  2. une nourrisse souvent avec filletages en entrée 3/4 et sorties 1/2 (https://www.manomano.fr/cat/nourrice+plomberie)

17min15sec : toujours mettre des vannes male-femelle pour pouvoir faire une intervention dans le future.

Eléments ⌀ tube (mm) Raccord
WC 12 3/8 femelle
Bagnoire 14 - 16 (confort) 3/8 femelle
Lavabo 14 3/8 femelle
Evier 14 3/8 femelle
Douche 14 - 16 (confort) souche coudée 1/2 puis raccord exentré pour ajuster le robinet

25min25sec: au bout du tuyau pour la baignoire on veut un raccord male car les tuyaux flexibles ont un raccord femelle. Il installe une souche (d'un côté on soude, de l'autre il y a un filletage en 3/8).

Plusieurs type de tuyaux:

  1. Cuivre
  2. PER - il kiff pas
  3. Multicouche

▶️ DJ. PLOMBERIE - soudure à l'étain SUPER SIMPLE

La base de la base avec chalumeau + etain

▶️ DJ. PLOMBERIE - TOUT SUR LES SOUDURES

Pour la culture

▶️ DJ. PLOMBERIE - Raccordement d'un radiateur en fonte TOUT EN CUIVRE

05min00: cintrage tuyau cuivre (commentaire : "sans le recuire du coup il frise")
15min10: ébavureur pour éviter les pertes de charge de l'eau qui passe dans les tuyaux.
16min40: machine à sertir cuivre-cuivre !
17min23: étanchéité à la filasse (avec grifure du pas de vis pour que la fillasse ne tourne pas) + pâte à joint

 

▶️ Loic Le Jardineur - Chauffage solaire et poêle bouilleur la combinaison gagnante

Isolation - Chauffage

▶️ Comme un pingouin dans le désert - Comment choisir LE MEILLEUR chauffage électrique ?

▶️ Comme un pingouin dans le désert - Quel est LE MEILLEUR ISOLANT pour faire un maximum d'économies ?

Plancher bois

▶️ Comme un pingouin dans le désert - Comment rénover un plancher d'étage mal dimensionné ? - LMKF #3

Classified in : Uncategorized - Tags : none

Create Your Own Hedge Fund: Increase Profits and Reduce Risk with ETFs and Options

Written by pmd - - no comments

Mes notes sur ce livre.

🔴 PART I: OUTPERFORMING THE MARKET
🟡 PART II: EHCHANGE TRADED FUNDS
🟢 PART III: OPTIONS
🔵 PART IV: PUTTING IT ALL TOGETHER


PART I: OUTPERFORMING THE MARKET


🔴 CHAPTER 1 Modern Portfolio Theory

On investit en bourse pour en tirer en retour sur investissement convenable.

🔴 CHAPTER 2 Can You Beat the Market? Should You Try?

Beaucoup de monde pense pouvoir battre le marché. Mais c'est déjà quasi impossible de faire la même performance que le marché.

🔴 CHAPTER 3 Hedge Funds


PART II: EHCHANGE TRADED FUNDS


🟡 CHAPTER 4 A Brief History of Mutual Funds and Exchange Traded Funds

🟡 CHAPTER 5 Traditional Mutual Funds

🟡 CHAPTER 6 Exchange Traded Funds


PART III: OPTIONS


🟢 CHAPTER 7 What Is an Option and How Does an Option Work?

🟢 CHAPTER 8 More Options Basics

🟢 CHAPTER 9 Why Investors Buy and Sell Options

🟢 CHAPTER 10 Option Strategies You Can Use to Make Money: Covered Call Writing

🟢 CHAPTER 11 Option Strategies You Can Use to Make Money: Uncovered Put Writing

🟢 CHAPTER 12 Historical Data: BuyWrite Index and Volatility Index


PART IV: PUTTING IT ALL TOGETHER


🔵 CHAPTER 13 Building a Portfolio

🔵 CHAPTER 14 Finding Your Style: Choosing an Option to Write

🔵 CHAPTER 15 Covered Call Writing in Action: A Year of Trading

Dans ce chapitre l'auteur trade pendant 1 an à base de vente de CALL couvert sur quelques ETF. Il explique que c'est possible de faire la même chose plus efficacement en vendant des PUT nus. Il se met en situation de vente de CALL couvert car beaucoup de broker n'autorise pas leurs client à vendre des PUTS.

Rouler une position type I: rouler une position pour se protéger

Rouler une position type II: rouler une position pour faire de l'argent

🔵 CHAPTER 16 Uncovered Put Writing in Action

Dans ce chapitre il se met en situation pendant quelques mois mais cette fois-ci en vendant des PUT principalement.
Si assigné sur une vente de PUT, il vendra alors un CALL couvert le mois prochain.

Entre la vente de PUT NAKED (avec du cash dispo si assignation) et la vente de CALL COUVERT, aucune des deux positions n'est plus risquée.

Plus interressant le PUT, car une seul opération donc moins de frais: vendre un PUT. Et aussi facile de prendre une plus-value, une seule opération: racheter le PUT.

JUNE EXPIRATION
Il vends des PUT qui sont à peine ITM (STRIKE > prix du sous-jacent).

🔵 CHAPTER 17 Odds and Ends and Conclusion

Rouler une position type III: rouler pour éviter de se faire assigner

Rouler une position type IV: rouler pour encaisser un premium allechant

Classified in : Options - Tags : none

Drag'n'drop to compress video using ffmpeg

Written by pmd - - no comments

1. Download ffmpeg

Link to download ffmpeg: https://github.com/BtbN/FFmpeg-Builds/releases

2. Create a *.bat file

@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
FOR %%A IN (%*) DO (
    ECHO %%A
    SET input=%%A
    ECHO !input!
    SET "output=!input!.compressed.mp4"
    ECHO !output!
    "C:\path\to\ffmpeg-master-latest-win64-gpl\bin\ffmpeg" -y -i !input! -vcodec h264 -acodec mp3 !output!
)
pause

Discussion about ffmpeg command line to use: Compress mp4 using FFMPEG · GitHub

Setting a variable into a for loop (batch)

3. Create a shortcut on Desktop and drag'n'drop

It will create a new file in same path than the video you want to compress with following name: "original_file_name.extension.compressed.mp4".
You can drag'n'drop several files.

 

AutoHotkey scripts for keyboard shortcuts

Written by pmd - - no comments

How do I put my hotkeys and hotstrings into effect automatically every time I start my PC?

There are several ways to make a script (or any program) launch automatically every time you start your PC. The easiest is to place a shortcut to the script in the Startup folder:

  1. Find the script file, select it, and press Ctrl + C.
  2. Press Win + R to open the Run dialog, then enter shell:startup and click OK or Enter. This will open the Startup folder for the current user. To instead open the folder for all users, enter shell:common startup (however, in that case you must be an administrator to proceed).
  3. Right click inside the window, and click "Paste Shortcut". The shortcut to the script should now be in the Startup folder.

Source

Activate a AutoHotkey script

Double-click to run *.ahk script. It will show up in the notification area.

Script #1: Insert Date in Any Program Using Keyboard Hotkey

^!d::                                               ; CTRL + ALT + D
    KeyWait, d                                      ; wait for d to be released
    KeyWait, d, D T0.2                              ; and pressed again within 0.2 seconds
    If ErrorLevel {                                 ; if timed-out (only a single press)
        FormatTime, CurrentDateTime,, yyyy_MM_dd_
        SendInput, %CurrentDateTime%
    }
    Else {                                          ; if not timed-out (double press)
        FormatTime, CurrentDateTime,, dd/MM/yyyy
        SendInput, %CurrentDateTime%
    }
return

Press Ctrl + Alt + D and it will print a date in this format: « 2022_01_14_ »
Press Ctrl + Alt + D + D and it will print a date in this format: « 14/01/2022 »

Source + FormatTime - Syntax & Usage | AutoHotkey

Script #2: Cursor Highlighter

Source

 

Classified in : Office - Tags : none
Rss feed of the articles