Skip to content

Instantly share code, notes, and snippets.

View youthlin's full-sized avatar

Youth.霖 youthlin

View GitHub Profile
// see:
// https://github.com/hunshcn/gh-proxy
// 首页静态文件
const ASSET_URL = 'https://hunshcn.github.io/gh-proxy/'
// 前缀, 如果自定义路由为 example.com/gh/*, 将 PREFIX 改为 '/gh/', 注意, 少一个杠都会错!
const PREFIX = '/'
// 分支文件使用 jsDelivr 镜像的开关, 0 为关闭, 默认关闭
const Config = {
jsdelivr: 0

[Mac]网易云音乐网页版歌词显示到菜单栏

  1. 安装 https://github.com/swiftbar/SwiftBar

    brew install swiftbar
  2. 实现一个网页服务器,用来存当前歌词,并提供一个接口查询当前歌词。 见下方 main.go.

@youthlin
youthlin / lyrics.lua
Last active November 5, 2024 02:15
show lyrics in vlc
--[[--
show lyrics on visualization 在可视化界面显示歌词
url 项目地址: https://gist.github.com/youthlin/a3b3fc033586bede6046086f3d889322
author 作者: youthlin
author url 作者博客: https://youthlin.com
How to install:
1. put this file on lua/intf/
2. enable extra interface: luaintf (Settings[Show all] -> Interface -> Main Interfaces -> extract modules='luaintf'[make the 'Lua interpreter' checked])
(important: extraintf=luaintf not lua)
package xxx;
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.extension.ExtensionLoader;
import com.alibaba.dubbo.rpc.Invocation;
import com.alibaba.dubbo.rpc.Invoker;
import com.alibaba.dubbo.rpc.cluster.LoadBalance;
import com.alibaba.dubbo.rpc.cluster.loadbalance.AbstractLoadBalance;
import com.alibaba.dubbo.rpc.cluster.loadbalance.ConsistentHashLoadBalance;
import com.alibaba.dubbo.rpc.cluster.loadbalance.RandomLoadBalance;
@youthlin
youthlin / bing.sh
Created September 26, 2018 02:25
BingWallpaper-xfce4
#!/bin/bash
#by youthlin.chen https://youthlin.com
dir=`pwd`
file=`curl -I "https://cn.bing.com/ImageResolution.aspx?w=1920&h=1080" 2>/dev/null | grep Location | awk '{print $2}'`
file=${file%_*}
file="${file}_1920x1080.jpg"
url="https://cn.bing.com$file"
file=${file##*/}
today=`date +%Y%m%d`
file="${today}_${file}"
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Downloader {
private static final String urlListFile = "out.txt";
<?php
echo "<h1>Hello, World</h1>" . PHP_EOL;
echo "<p>Welcome</p>" . PHP_EOL;
$img = "{$_SERVER["REQUEST_SCHEME"]}://{$_SERVER["HTTP_HOST"]}/uploads/qtalk.jpg";
$prefix = $_SERVER["REQUEST_SCHEME"] . "://" . $_SERVER["HTTP_HOST"] . "/";
echo "$prefix<br>" . PHP_EOL;
if(0 === strpos($img, $prefix)){
$img = substr($img, strlen($prefix));
$path = realpath($img);
@youthlin
youthlin / 1. UTF8 转 Unicode
Last active September 3, 2016 03:08
去哪儿网2017笔试
import java.util.Scanner;
/* UTF8 转 Unicode */
public class A {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String line;
while (in.hasNextLine()) {
line = in.nextLine();
@youthlin
youthlin / Filename
Created January 10, 2016 15:43
Description
System.out.println("What's this");