Skip to content

Instantly share code, notes, and snippets.

View lechuckcaptain's full-sized avatar
🏠
Working from home

Marco Pagliari lechuckcaptain

🏠
Working from home
View GitHub Profile
@lechuckcaptain
lechuckcaptain / raw_recover.py
Created June 15, 2023 08:38
Recover JPEG thumbnail from CR2 raw files
import rawpy
import imageio
import os
from os.path import join, getsize
input_path_dir = 'input'
output_path_dir = 'output'
for root, dirs, files in os.walk(input_path_dir):
This gists shows the steps made for compiling ZLD without calling make clean as first command in the repository
@lechuckcaptain
lechuckcaptain / 0_zld_compilation
Last active April 20, 2021 14:43
ZLD compilation
This gist shows the steps followed and the issues during ZLD compilation
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is part of urlwatch (https://thp.io/2008/urlwatch/).
# Copyright (c) 2008-2016 Thomas Perl <thp.io/about>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@lechuckcaptain
lechuckcaptain / gist:0dc129e0a0a14ad1fded
Last active April 2, 2018 10:03
Filter SAMSUNG spam logcat messages (by TAG)
^(?!.*(AbsListView|skia|ProgressBar|IInputConnectionWrapper|dalvikvm|MoreInfoHPW_ViewGroup|MotionRecognitionManager)).*$
@lechuckcaptain
lechuckcaptain / ProxySelector saveToDb() method
Last active August 29, 2015 13:56
ProxySelector saveToDb
boolean saveToDb() {
String hostname = mHostnameField.getText().toString().trim();
String portStr = mPortField.getText().toString().trim();
int port = -1;
int result = validate(hostname, portStr);
if (result > 0) {
showError(result);
return false;
public static double listenForNewVolume(double calibValue) {
AudioRecord ar = findAudioRecord();
int BUFFSIZE = AudioRecord.getMinBufferSize(ar.getSampleRate(), ar.getChannelConfiguration(),
ar.getAudioFormat()) * 2;
Log.v("AV", "Post new " + BUFFSIZE);
double splValue = 0.0;
double rmsValue = 0.0;
double retSpl = 0;
try {