Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing on work

見える biezhi

🎯
Focusing on work
View GitHub Profile
@biezhi
biezhi / DataConvertionUtil.java
Created May 17, 2018 — forked from robertchong/DataConvertionUtil.java
Excel <-> CSV Conversion using Apache POI
View DataConvertionUtil.java
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Iterator;
import org.apache.poi.hssf.usermodel.HSSFCell;
View Demo.java
import java.util.function.Function;
/**
* @author biezhi
* @date 2018/5/12
*/
public class Demo {
public Function<String, Class> loader() {
return Unchecked.function(Class::forName);
@biezhi
biezhi / mysql_back.sh
Created Apr 24, 2018
在 Linux 上定时备份 MySQL 数据库,并发送备份到邮件
View mysql_back.sh
#!/bin/sh
#this is the prefix before the filename and can be anything you want
fileprefix='mysql_backup_';
#this is your mysql user - best to create a new mysql user called backup that has access to all databases
myuser='backup';
#your mysql password
mypass='s0mething$ecure123';
@biezhi
biezhi / AsciiArt.java
Created Apr 16, 2018
java 版本 文字生成 ascii 字符
View AsciiArt.java
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
public class AsciiArt {
public void drawString(String text, String artChar, Settings settings) {
@biezhi
biezhi / email.go
Created Mar 6, 2018 — forked from genedna/email.go
Golang 从腾讯企业邮箱的发送邮件和一个 HTML 模板。
View email.go
package main
import (
"crypto/tls"
"fmt"
"log"
"net"
"net/smtp"
)
@biezhi
biezhi / ffmpeg常用操作.md
Last active Aug 28, 2018
ffmpeg常用操作
View ffmpeg常用操作.md

提取音频

ffmpeg -i a.mp4 -f mp3 -vn a.mp3

提取视频

ffmpeg -i a.mp4 -vcodec copy -an b.mp4
@biezhi
biezhi / ffmpeg.md
Created Feb 9, 2018 — forked from ameizi/ffmpeg.md
ffmpeg视频合并、格式转换、截图
View ffmpeg.md

使用ffmpeg合并MP4文件

ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"
@biezhi
biezhi / character.md
Last active Jun 1, 2019
HTML字符实体(Character Entities),转义字符串(Escape Sequence)
View character.md
<title>常用HTML转义字符,html转义符,JavaScript转义符,html转义字符表,HTML语言特殊字符对照表(ISO Latin-1字符集) - 来源:嘻嘻网 114.xixik.com</title> <style type="text/css" media="screen">
@biezhi
biezhi / linux_terminal_color_code.md
Last active Feb 6, 2018
linux 终端颜色代码
View linux_terminal_color_code.md
echo -e "\033[背景;字体颜色m 字符串\033[0m"
eg : echo -e "\033[30m 黑色字 \033[0m"

字体颜色(30-37)


背景颜色(40-47)