Skip to content

Instantly share code, notes, and snippets.

@MarshalW
MarshalW / convert-gbk-to-utf8.md
Created February 14, 2022 07:22
转换gbk编码文件到utf8

转换gbk编码文件到utf8

iconv -f gbk -t utf-8 base_module.sql > base_module.utf.sql
@MarshalW
MarshalW / oracle-docker-sqlplus.md
Created February 1, 2022 04:04
在 docker 下使用 oracle 数据库

在 docker 下使用 oracle 数据库

安装和启动 oracle 数据库:

$ docker run -d -p 1521:1521 -e ORACLE_PASSWORD=password gvenzl/oracle-xe:11

查看启动是否成功:

@MarshalW
MarshalW / lotus-root.md
Created January 28, 2022 10:08
糖醋藕片

糖醋藕片

  • 藕刮皮洗净,切片片备用
  • 蒜拍扁切碎
  • 醋、盐、糖、生抽和鸡精混合调成酱汁
  • 热锅倒油,放入蒜爆香
  • 放入藕片翻炒至8成熟
  • 倒入酱汁翻炒至汤汁变得粘稠
  • 快点上盘以免藕片不脆了
@MarshalW
MarshalW / cookbook.md
Last active December 31, 2022 03:45
菜谱记录
@MarshalW
MarshalW / millet.md
Last active January 28, 2022 07:55
小米粥.md

小米粥

  • 冷水淘洗小米,浸泡1小时
  • 小米控水备用
  • 锅中清水煮开,小米倒入锅中
  • 大火烧开,在转小火20分钟
  • 用筷子搅动3分钟,搅出米油
  • 关火
@MarshalW
MarshalW / jeecgboot-running.md
Last active January 29, 2022 08:52
运行 jeecgboot步骤

运行 JeecgBoot 步骤

下载代码

当前最新版本是 v3.0,下载代码:

$ git clone https://github.com/jeecgboot/jeecg-boot.git
@MarshalW
MarshalW / spring-boot-hello-world.md
Last active January 25, 2022 09:36
springboot hello world

springboot hello world

软件安装

macOS环境下。

安装 intellij idea ce 版本

$ brew install --cask intellij-idea-ce
@MarshalW
MarshalW / python-ffmpeg-progress-bar.md
Last active January 5, 2022 09:43
python 执行 ffmpeg 带进度条

python 执行 ffmpeg 带进度条

创建 test.py

#!/usr/bin/env python3

import shlex
from subprocess import Popen, PIPE
import re
@MarshalW
MarshalW / baidu-api-gps-address.md
Created December 25, 2021 11:08
GPS 坐标通过百度 api 得到地址信息

GPS 坐标通过百度 api 得到地址信息

比如照片的gps信息,是实际的经纬度,通过百度地图 api 得到地址信息的代码:

#!/usr/bin/env python3

import requests

# 百度 拾取坐标 http://api.map.baidu.com/lbsapi/getpoint/index.html
@MarshalW
MarshalW / python-date-format.md
Last active December 23, 2021 07:02
python 时间数值和格式字符串的转换

python 时间数值和格式字符串的转换

字符串转换Unix time (POSIX time / Epoch time)

比如:2021:07:17 15:45:12 要转换为 1626507912

>>> from datetime import datetime
>>> date_str='2021:07:17 15:45:12'
>>> date=datetime.strptime(date_str, '%Y:%m:%d %H:%M:%S')