Skip to content

Instantly share code, notes, and snippets.

View datiti's full-sized avatar

Cyrille Mescam datiti

View GitHub Profile
@mashingan
mashingan / sqlite3gorm.go
Last active August 20, 2023 16:04
Simple CRUD example working with Gorm
package main
import (
"fmt"
"net/http"
"strconv"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/sqlite"
"github.com/labstack/echo"
@xthezealot
xthezealot / README.md
Last active August 3, 2023 14:07
Normalize unicode file names (converts UTF-8 NFD to NFC). Required by macOS clients through AFP/NFS/SMB. Tested on Synology DSM 6.2 with built-in Python 2.7.12.

NFCFN.py

Normalize unicode file names (converts UTF-8 NFD to NFC).
Required by macOS clients through AFP/NFS/SMB.

Tested on Synology DSM 6.2 with built-in Python 2.7.12.

Usage

@cboulanger
cboulanger / pdfocr.sh
Last active April 1, 2021 08:45
OCR of a scanned PDF, using imagemagick, ghostscript, poppler and tesseract
#!/bin/bash
# builds on:
# https://ubuntuforums.org/showthread.php?t=1370827
# Prerequisites:
# On Mac OS:
# brew install --with-libtiff --with-ghostscript imagemagick
# brew install --all-languages tesseract
# brew install poppler
@mikehadlow
mikehadlow / README.md
Last active July 25, 2023 08:55
D3js Graph with X and Y crosshairs, and a threshold line.

Example of a D3js time series graph with X,Y crosshairs and a threshold line. Just copy the drawLineGraph function and call it with your data. The data shoud be an array of two element arrays. Something like:

var data = [
    [new Date(2014, 01, 10), 404],
    [new Date(2014, 01, 11), 123],
    [new Date(2014, 01, 12), 666]
    ];
    
var warnLine = { lineValue: 200, label: 'my important threshold' };