[TOC]
maybe not the right code/summary
https://www.zhihu.com/question/19732473/answer/26101328
- 前提
#!/bin/bash | |
# usage: bash this.sh path | |
# $1: path, parsed | |
jarList() { | |
path=$1 | |
if [ -d "$path" ]; then | |
cd "$path" || exit #https://github.com/koalaman/shellcheck/wiki/SC2045 | |
for sub in *; do | |
if [ "/" = "$1" ]; then |
#!/bin/bash | |
# usage: bash this.sh lines lineBytes file toDir | |
lines=$1 | |
lineBytes=$2 | |
file=$3 | |
toDir=$4 | |
if [ "Darwin" = "$(uname)" ]; then | |
# MacOS: brew install coreutils |
// URL: http://syjy.5u5u5u5u.com/syjy/reserve/toLessonReservePage_xianxietiyan.htm | |
// 步骤: 一步步拷贝执行 | |
// 1. get map | |
jQuery(function ($) { | |
window._resultMap = {}; | |
$('#areaSwitch>li').each(function (i, v) { | |
var areaId = $(v).attr('areaid'); | |
$.get('http://syjy.5u5u5u5u.com/syjy/reserve/queryExperienceLessonReserveData.htm', { | |
areaId: areaId |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import org.apache.commons.lang3.StringUtils; | |
import org.jsoup.Jsoup; |
/** | |
* @param url | |
* endsWith("/") | |
* @param str | |
* searchStr | |
*/ | |
private static void search(String url, String str) { | |
try { | |
Document doc = Jsoup.connect(url).get(); | |
Elements elements = doc.select("pre > a"); |
[TOC]
maybe not the right code/summary
https://www.zhihu.com/question/19732473/answer/26101328
# https://fishshell.com/docs/current/tutorial.html#tut_autoload | |
function _man | |
if type "$argv[1]" >/dev/null | |
if type "$argv[1]" | grep -m 1 " is a function with definition\$" >/dev/null | |
type "$argv[1]" >&2 | |
else | |
if test "nginx" = "$argv[1]" | |
"$argv[1]" -h 2>&1; echo -e "\n" | |
else if test "echo" != "$argv[1]" | |
"$argv[1]" --help 2>&1; echo -e "\n" |
#!/system/bin/bash | |
# ln -s /proc/self/fd /dev/fd | |
# https://forum.xda-developers.com/android/software-hacking/dev-lastest-bash-android-t2898295 | |
## mount -o remount,rw /system | |
# toolbox ls -la /sdcard/Download | |
# toybox ls -lFA /sdcard/Download | |
## find -path bug: https://github.com/landley/toybox/issues/73 | |
# busybox ls -lFA /sdcard/Download |
#!/usr/bin/python | |
# -*- coding: UTF-8 -*- | |
import sys | |
import subprocess | |
def cmp_creation(x, y): | |
xs = x.split("/") | |
ys = y.split("/") |