Skip to content

Instantly share code, notes, and snippets.

# Generated by ChatGPT
import os
import sys
import glob
import chardet
import codecs
def change_file_encoding(file_path, target_encoding):
# Determine the current encoding of the file
@cmsong-shina
cmsong-shina / logger.go
Last active July 5, 2021 08:49 — forked from rnyrnyrny/logger.go
log using uber zap and lumberjack
// 2021.7.2 UPDATE
// According to zap's doc, now we can use zapcore.AddSync to directly add lumberjack as a zap sync
// see https://github.com/uber-go/zap/blob/master/FAQ.md#does-zap-support-log-rotation
// thanks to:
// https://studygolang.com/articles/17394
// https://stackoverflow.com/questions/54395407/zap-logging-with-1-customized-config-and-2-lumberjack
package logger
import (
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
body: SafeArea(
child: Center(
child: Column(
children: [