Skip to content

Instantly share code, notes, and snippets.

View kikislater's full-sized avatar
🏄‍♂️

Sylvain POULAIN kikislater

🏄‍♂️
View GitHub Profile
@kikislater
kikislater / huawei_e8372_config.md
Created January 9, 2024 13:35 — forked from guseppiguliano/huawei_e8372_config.md
Huawei E8372 Linux Configuration and Setup

Dependencies

  1. usb_modeswitch, usb_modeswitch-data
  2. libusb1
  3. libusb-devel(Fedora), libusb-dev(Debian based)

Configuration

By default, your linux box would register your Huawei E8372 as a Mass Storage device and not (somehow) as a modem. First, make sure you have the exace same device we're talking about. This can be confirmed by looking at 2 values. Give the following command (while the dongle is plugged in):

    sudo su
    lsusb | grep Huawei
@kikislater
kikislater / sms-to-telegram.md
Created January 9, 2024 13:34 — forked from ethaniel/sms-to-telegram.md
HOWTO: Receive SMS via 4G/LTE Huawei stick on Raspberry Pi 4 and forward them via Telegram

HOWTO: Receive SMS via 4G/LTE Huawei stick on Raspberry Pi 4 and forward them via Telegram

I live abroad and have only 1 sim card slot in my phone. It holds the SIM card of the country that I am in right now. But I also have another SIM card from my home country which receives my banking SMS codes. I can't afford to lose the "home" SIM card, so I decided to keep it in my house and forward the SMS messages to my main phone and computer via Telegram (just like Whatsapp, but so much better).

I also made a choice to use a 4G/LTE stick instead of 3G, because the 3G signal in my area is getting worse in worse due to operators upgrading their equipment.

Prerequisites

  1. Raspberry Pi 4
  2. Huawei E8372 (but can be any similar)

Step 1 - Get the Huawei card to work properly with Raspberry

@kikislater
kikislater / camera_calculator.py
Created July 25, 2023 17:37 — forked from luipir/camera_calculator.py
Camera Footprint Calculator
"""
***************************************************************************
camera_calculator.py
---------------------
Date : August 2019
Copyright : (C) 2019 by Luigi Pirelli
Email : luipir at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
@kikislater
kikislater / CompareCompress.py
Created July 20, 2023 13:02 — forked from jevans5489/CompareCompress.py
Compares lossless GDAL Compression on a sample image.
# ----------------------------------------------------------------------------------------------------------------------
# Name: CompareCompression.py
# Py-Version: 3.x.x
# Purpose: Takes a sample GeoTIFF and writes a table to the command line describing the
# file size, read speed, and write speed of each GDAL compression. You can use this
# tool to decide how to best compress a single image, or a collection of images.
#
# Notes: The Python interpreter and GDAL must be accessible by cmd. The easiest way to do
# this by using the python installation included with ArcGIS Pro 2.3.x and later.
# This installation has the GDAL site package and binaries already configured. Add
@kikislater
kikislater / GTiff_compression_benchmark.py
Created July 20, 2023 13:02 — forked from kr-stn/GTiff_compression_benchmark.py
Benchmark filesize and read/ write times for various GeoTiff compression algorithms
__author__ = 'kersten.clauss'
"""Benchmark different GeoTiff compression algorithms.
Usage: GTiff_compression_benchmark.py some_geo.tif
Requires the GDAL tools to be present and executable from the command line of your system.
This script will take a GeoTiff as input and create copies with different compression algorithms from it.
It measures the filesize, compression and decompression times and returns them as a table.
import numpy as np
import cv2
import glob
import yaml
#import pathlib
# termination criteria
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001)
# prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0)
objp = np.zeros((7*7,3), np.float32)
@kikislater
kikislater / davfs2.conf
Last active November 25, 2022 14:24
Webdav configuration for Nextcloud
delay_upload 1
use_locks 0 # Unsupported by Nextcloud
cache_size 1024 # MiByte
gui_optimize 1 #
nodeodm.exe --odm_path c:\ODM
#!/bin/bash
##############################################
# Download du fichier IP de BlockList.de : #
##############################################
# Vérifie que l'on est en Root
if [[ $EUID -ne 0 ]];
then
echo "Ce script doit être exécuté avec les privilèges administrateur"
@kikislater
kikislater / eMotion_3.5_for_ebee_classic.pol
Last active September 3, 2022 07:53
Sensefly eMotion 3.5 for ebee classic running in Linux with wine under PlayOnLinux
#!/bin/bash
# Last revision : (2021-04-12)
# Tested : Manjaro Linux
# Author : Sylvain POULAIN
# Script licence : GPLv3
# This script is designed for PlayOnLinux and PlayOnMac.
# CHANGELOG
# [Sylvain POULAIN] (2021-04-12)
# Script creation : using wine 4.0