This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2020 Mailtech.cn, Ltd. All Rights Reserved. | |
*/ | |
package cn.mailtech.maven.resolver; | |
import java.io.*; | |
import java.lang.reflect.Method; | |
import java.net.*; | |
import java.util.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the implemention of getPrimitiveWrapperClass & getPrimitiveClass | |
public static <T> Class<T> getPrimitiveWrapperClass(Class<T> primitiveClass) { | |
if ((primitiveClass == null) || !primitiveClass.isPrimitive()) { | |
throw new IllegalArgumentException("Not a primitive class: " + primitiveClass); | |
} | |
String name = primitiveClass.getName(); | |
if (primitiveClass == int.class) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE module PUBLIC | |
"-//Puppy Crawl//DTD Check Configuration 1.2//EN" | |
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> | |
<module name="Checker"> | |
<!-- Checks that property files contain the same keys. --> | |
<!-- See http://checkstyle.sf.net/config_misc.html#Translation --> | |
<module name="Translation"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.format = function(pattern/*, args ... */) { | |
var result = ""; | |
function parse() { | |
// %[argument_index$][flags][width][.precision][conversion] | |
// $0 - the entire matched part | |
// $1 - argument_index '$' | |
// $2 - flags | |
// $3 - width |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Youtube-DL DASH Video and Audio merging script | |
#Written by QuidsUp | |
#Edited by Christoph Korn | |
#Edited by William Leung | |
File1New=video.mp4 | |
File2New=audio.m4a | |
URL=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_vcs_info() { | |
# parse git branch | |
git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)#git:\1)#' | grep git && return | |
# parse svn branch | |
# http://svn.host/xxx | |
REPO_ROOT=`svn info 2>/dev/null | sed -ne 's#^Repository Root: ##p'` | |
[ -z "$REPO_ROOT" ] && return | |
# http://svn.host/xxx -> 空串 | |
# http://svn.host/xxx/trunk -> /trunk | |
# http://svn.host/xxx/branches/yyy/zzz -> /branches/yyy/zzz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.19370138645172119</real> | |
<key>Green Component</key> | |
<real>0.15575926005840302</real> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GFWLIST=https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt | |
PROXY=127.0.0.1:7070 | |
cd `dirname "${BASH_SOURCE[0]}"` | |
echo "Downloading gfwlist from $GFWLIST" | |
curl "$GFWLIST" --socks5-hostname "$PROXY" > /tmp/gfwlist.txt | |
/usr/local/bin/gfwlist2pac \ | |
--input /tmp/gfwlist.txt \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from bs4 import BeautifulSoup | |
import requests | |
username = '' ###账号### | |
password = '' ###密码### | |
login_url = 'http://v2ex.com/signin' ###如V2EX设置了使用 SSL,必须改 https### | |
index_url = 'http://v2ex.com' ###同上### | |
mission_url = 'http://www.v2ex.com/mission/daily' ###同上### | |
UA = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) \ |