Skip to content

Instantly share code, notes, and snippets.

View hahouari's full-sized avatar

Hocine Abdellatif Houari hahouari

View GitHub Profile
@Meldiron
Meldiron / backup.sh
Last active May 5, 2024 10:45
Backup and Restore Appwrite, the lazy way 🐌
# Make sure to stop Appwrite before this backup,
# and make sure you have enough space on the machine.
# After backing up, make sure there is a file in 'backups/backup-___.tar.gz'.
# Also please check size of this file, it should be at least 5kb, even for small instances.
docker run --rm \
-v appwrite_appwrite-mariadb:/backup/appwrite-mariadb \
-v appwrite_appwrite-redis:/backup/appwrite-redis \
-v appwrite_appwrite-cache:/backup/appwrite-cache \
@Taosif7
Taosif7 / GeoHash.dart
Last active February 10, 2022 09:42
Dart Geohash Implementation
String chars = "0123456789bcdefghjkmnpqrstuvwxyz";
const BITS_PER_BASE32_CHAR = 5;
main() {
LatLng location = LatLng(22.5678, 72.1234);
String geohash = encode(location, 8);
print("Original: " + location.toString());
print("GeoHash: " + geohash);
print("Decoded: " + decodeGeoCode(geohash).toString());
}
@NitinPraksash9911
NitinPraksash9911 / UnzipUtils.kt
Last active May 6, 2024 15:31
Unzipping file in android/kotlin
import java.io.*
import java.util.zip.ZipFile
/**
* UnzipUtils class extracts files and sub-directories of a standard zip file to
* a destination directory.
*
*/
object UnzipUtils {
@tfeldmann
tfeldmann / duplicates.py
Last active May 26, 2024 03:18
Fast duplicate file finder written in python
#!/usr/bin/env python
"""
Fast duplicate file finder.
Usage: duplicates.py <folder> [<folder>...]
Based on https://stackoverflow.com/a/36113168/300783
Modified for Python3 with some small code improvements.
"""
import os
import sys
@jonlabelle
jonlabelle / npm_vs_yarn_command_translation_cheatsheet.md
Last active April 11, 2024 15:26
npm vs yarn command translation cheat sheet
@kasperpeulen
kasperpeulen / README.md
Last active February 20, 2024 02:52
How to pretty-print JSON using Dart.