Skip to content

Instantly share code, notes, and snippets.

@PetitGrigri
PetitGrigri / mount_ntfs_disk.sh
Last active December 31, 2020 18:03
Mount NTFS disks on mac OS by using NTFS-3G
#!/bin/bash
# This script mount one or more ntfs disks on a mac (with read and write access).
#
# It is inspirated from the wiki available on https://github.com/osxfuse/osxfuse/wiki/NTFS-3G
# but prevents to replace the Apple's NTFS mount tool (located on /sbin/mount_ntfs) by using a
# simple command.
#
# To use this script, some preconditions are required:
# - macFuse must be installed (https://osxfuse.github.io/)
@PetitGrigri
PetitGrigri / gist:18ff31828357c920cead9d7a2955edf4
Created April 11, 2017 20:19
Utility class allowing to quickly convert a date to string and vice versa (use with Android when you need to store date with sqlite)
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateUtils
{
private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-DD HH:MM:SS.SSS");
public static Date stringToDate(String stringDate) {
try {
return dateFormat.parse(stringDate);