Skip to content

Instantly share code, notes, and snippets.

View nelero's full-sized avatar

Aurélien Pohu nelero

View GitHub Profile
@kogens
kogens / qr_from_pdf.py
Last active April 28, 2025 18:07
Extract QR codes from PDF files
"""
Extract images from PDF files and decode any QR codes found.
Requirements:
> pip install pandas opencv-python pymupdf qrdet==1.10 qreader==2.11 tqdm xlsxwriter
See also the docs for the QR part
https://github.com/Eric-Canas/qrdet
https://github.com/Eric-Canas/qreader
"""
@coulmont
coulmont / deces_polaire_anime.R
Created December 2, 2020 13:02
deces en france, coordonnées polaires, version animée
# ajout des informations pour l'animation
# ---------------------------------------
library(gganimate)
library(broom)
dc <- bind_rows(dc_jour,dc_insee_jour,deces_ecdc,deces_insee_provisoires)
# on démarre du fichier dc utilisé pour le graphique surmortalité
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 11, 2025 17:34
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@arnisjuraga
arnisjuraga / HTML_UnEncode.sql
Created February 13, 2020 14:08
Convert HTML entities to HTML code in MySQL
/*
Function converts encoded HTML entities back to HTML tags in pure MySQL
-- Original method: https://stackoverflow.com/a/41460016/1720476
-- @Balmiopour comment added https://stackoverflow.com/questions/3678980/is-there-a-mysql-function-to-decode-html-entities#comment71742861_41460016
Version history:
@julienbourdeau
julienbourdeau / clean-prestashop-db.sql
Last active March 13, 2025 17:41
Clean PrestaShop database - Drop old and unless data
# Delete all logs
TRUNCATE ps_log;
# Delete old connection data (only used for stats)
# change 2016-02-01 00:00:00 according to you needs
DELETE c, cs
FROM ps_connections c
LEFT JOIN ps_connections_source cs ON (c.id_connections = cs.id_connections)
WHERE c.date_add < '2016-02-01 00:00:00';
@cedricblondeau
cedricblondeau / ImageChooser.php
Created January 14, 2016 02:40
Image Chooser for Magento2 widgets
<?php
namespace Vendor\Module\Block\Adminhtml\Widget;
class ImageChooser extends \Magento\Backend\Block\Template
{
/**
* @var \Magento\Framework\Data\Form\Element\Factory
*/
protected $_elementFactory;
@Bonno
Bonno / mp4-to-wav
Created February 10, 2015 09:24
Convert mp4 to WAV with ffmpeg
ffmpeg -i <infile> -ac 2 -f wav <outfile>
@appleboy
appleboy / copy_content.mkd
Last active May 18, 2023 07:03
Copy all branch from another repository?

Repository url

origin: https://github.com/appleboy/git-test
remote: https://github.com/appleboy/html5-template-engine

Copy all branch from another repository

@tleunen
tleunen / expandable-button.css
Created May 15, 2013 01:56
Create an expandable button in width, with 3 background image in css (left, middle and right parts). All this keeping the html very simple.
.cbtn {
position: relative;
top: 0px;
left: 9px; /* width of left part (:before) */
overflow: visible; /* this make the :before and :after in position:absolute to appear */
background: url(img/middle.png);
height: 50px;
padding: 0;
@iegik
iegik / mage777.sh
Last active July 26, 2024 07:54
Make Magento Template Path Hints hidden, to not distroy page layout
#!/bin/bash
find . -type d -exec chmod 777 {} \;
find . -type f -exec chmod 644 {} \;
sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx *
sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx *