Skip to content

Instantly share code, notes, and snippets.

View fmertins's full-sized avatar

Fernando Mertins fmertins

  • Dell Technologies
  • Rio Grande do Sul, Brazil
View GitHub Profile
@jgdoncel
jgdoncel / fn_remove_accents.sql
Last active April 19, 2024 12:20
MySQL Function to remove accents and special characters
DROP FUNCTION IF EXISTS fn_remove_accents;
DELIMITER |
CREATE FUNCTION fn_remove_accents( textvalue VARCHAR(10000) ) RETURNS VARCHAR(10000)
BEGIN
SET @textvalue = textvalue COLLATE utf8_general_ci;;
-- ACCENTS
SET @withaccents = 'ŠšŽžÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝŸÞàáâãäåæçèéêëìíîïñòóôõöøùúûüýÿþƒ';
@pklaus
pklaus / smbsync.py
Last active May 25, 2020 19:37
One-way sync to an SMB/CIFS server – Currently only a flat structure of files in the source directory is supported
#!/usr/bin/env python
""" One-way sync to an SMB/CIFS server (needs pysmb) """
import logging, socket, os, sys, math
from datetime import datetime
try:
from smb.SMBConnection import SMBConnection
from smb.base import NotReadyError, NotConnectedError
from nmb.NetBIOS import NetBIOS
@amirkdv
amirkdv / php_mdb.rst
Last active August 25, 2023 13:14
How to handle MS Access MDB files in Linux with PHP5 PDO and ODBC

To be able to use PHP5 PDO with MS Access mdb files the following is required (the same applies for the PHP4 style of using odbc_X except for the obviously PDO specific requirements):

PHP ODBC module

In Linux this is achieved by intalling the php5-odbc package: