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
#!/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 |
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
# 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" |
[TOC]
maybe not the right code/summary
https://www.zhihu.com/question/19732473/answer/26101328
- 前提
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
/** | |
* @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"); |
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
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; |
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
// 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 |
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 | |
# usage: bash this.sh lines lineBytes file toDir | |
lines=$1 | |
lineBytes=$2 | |
file=$3 | |
toDir=$4 | |
if [ "Darwin" = "$(uname)" ]; then | |
# MacOS: brew install coreutils |
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 | |
# 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 |
NewerOlder