Skip to content

Instantly share code, notes, and snippets.

View haomega's full-sized avatar
🏠
Working from home

haomega

🏠
Working from home
View GitHub Profile
@haomega
haomega / CompletableFutureEx.java
Last active February 1, 2025 07:53
Java CompletableFuture Extend
package com.luhao.demo;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.IntPredicate;
/**
@haomega
haomega / typing-words-resume.html
Created March 24, 2022 13:23
会动的代码,typing giving words, support backspace.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>resume-demo</title>
</head>
@haomega
haomega / cros.java
Created July 29, 2019 05:46
允许跨域响应头
response.addHeader("Access-Control-Allow-Origin", "*")
response.addHeader("Access-Control-Allow-Methods","GET, OPTIONS, HEAD, PUT, POST")
@haomega
haomega / ffmpeg
Last active July 17, 2019 05:47
FFmpeg:每隔1s截取一帧保存为图片
ffmpeg -i videoplayback.mp4 -y -f image2 -vf fps=fps=1 ./test/%03d.jpg
/*
-y: 覆盖
fps=fps=1:隔1s,fps=fps=1/3: 隔3s
%03d:文件名格式
*/
@haomega
haomega / month_12.sql
Created July 10, 2019 07:43
获取12个月份格式的值
select lpad(level,2,0) from dual
connect by level<13