This file contains hidden or 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
| #!/usr/bin/env python | |
| import web | |
| urls = ( | |
| '/', 'index' | |
| ) | |
| class index: |
This file contains hidden or 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 paths of jar files are listed in a text file named "files" | |
| find $(cat files) -print -exec zipgrep "the-characters-needed-to-be-searched" '{}' \; | |
| # search jar files recursively in path the-folder-path | |
| find the-folder-path -name "*.jar" | xargs -I{} sh -c 'echo searching in "{}"; zipgrep "the-characters-needed-to-be-searched" {}' |
This file contains hidden or 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
| curl -vX POST 127.0.0.1:8888/my/api?para1=123 -H 'Content-Type: application/json' -d @/home/path/to/mydata.json | |
| # mydata.json | |
| # { | |
| # "para": "m", | |
| # "data": { | |
| # "d1": "111", | |
| # "d2": "222" | |
| # } | |
| # } |
This file contains hidden or 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
| grep -nr --include '*.cpp' "Aggregated" ./source | |
| find ./source -type f -print0 | xargs -0 grep -rHinbo "AggregatedDiscoveryService.StreamAggregatedResources" | |
| find ./source -type f -print0 | xargs -0 grep -rHino "AggregatedDiscoveryService.StreamAggregatedResources" | |
| find ./source -type f -print0 | xargs -0 grep -n "AggregatedDiscoveryService.StreamAggregatedResources" | |
| find ./source -type f -print0 | xargs -0 grep "ads.pb.h" |
This file contains hidden or 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
| black=30m | |
| red=31m | |
| green=32m | |
| yellow=33m | |
| blue=34m | |
| magenta=35m | |
| cyan=36m | |
| white=37m | |
| blacklog="\"\033[$black\" \$0 \"\033[39m\"" |
This file contains hidden or 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
| CUSTOMIZE_FOLDER=/home/software/neo4j/mygraphdb/ | |
| docker run \ | |
| --name mygraphdb \ | |
| --publish=7474:7474 --publish=7687:7687 \ | |
| --detach \ | |
| --volume=$CUSTOMIZE_FOLDER/data:/data \ | |
| --volume=$CUSTOMIZE_FOLDER/conf:/var/lib/neo4j/conf \ | |
| --volume=$CUSTOMIZE_FOLDER/logs:/logs \ | |
| --volume=$CUSTOMIZE_FOLDER/import:/import \ | |
| --volume=$CUSTOMIZE_FOLDER/plugins:/plugins \ |
This file contains hidden or 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
| #include <iostream> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <linux/ioctl.h> | |
| #include <linux/types.h> | |
| #include <linux/v4l2-common.h> | |
| #include <linux/v4l2-controls.h> | |
| #include <linux/videodev2.h> | |
| #include <fcntl.h> | |
| #include <unistd.h> |
This file contains hidden or 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 | |
| # 打印所有的颜色和颜色代码 | |
| # 在 fedora 上 gnome-terminal 3.30.1 中已测试 | |
| printf "\e\033[4;31m 浅 色\033[0m \t\t\033[1;4;31m 深 色\033[0m\n" | |
| printf "\e[0;30;47m 黑 \e[0m 0;30m \t\e[1;30;40m 深 灰 \e[0m 1;30m\n" | |
| printf "\e[0;31;47m 红 \e[0m 0;31m \t\e[1;31;40m 深 红 \e[0m 1;31m\n" | |
| printf "\e[0;32;47m 绿 \e[0m 0;32m \t\e[1;32;40m 深 绿 \e[0m 1;32m\n" | |
| printf "\e[0;33;47m 黄 \e[0m 0;33m \t\e[1;33;40m 亮 黄 \e[0m 1;33m\n" |
This file contains hidden or 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
| dev.new() | |
| par(mfrow=c(1,2)) | |
| # Add label to lines instead of legend when plotting. | |
| plot(1:100, 1:100,xaxt="n",yaxt="n",bty="n",pch="",ylab="",xlab="", main="", sub="") | |
| lines(1:20, rep(2,20), col="blue") | |
| text(x=mean(c(1:20)), y=2, labels=sprintf("%d", 1), col="blue") | |
| lines(1:10, 1:10, col="red") | |
| text(x=100, y=100, pos=1, labels=sprintf("%d", 21), col="red") | |
| text(x=100, y=100, pos=2, labels=sprintf("%d", 22), col="red") |
This file contains hidden or 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 | |
| # update_gfwlist.sh | |
| # Author : VincentSit | |
| # Copyright (c) http://xuexuefeng.com | |
| # | |
| # Example usage | |
| # | |
| # ./whatever-you-name-this.sh | |
| # | |
| # Task Scheduling (Optional) |