在linux中,-
如果单独使用 - 符号,不加任何该加的文件名称时,代表"标准输入"的意思
如下小技巧,nc
命令来传输目录下多个文件
# host A, on receiver, go to destination directory and execute:
$ nc -l $port | tar xf -
# host B,on sender
// #popclip extension for ChatGPT | |
// name: LimboGPT | |
// icon: iconify:logos:openai-icon | |
// language: javascript | |
// module: true | |
// entitlements: [network] | |
// options: [{ | |
// identifier: apikey, label: API Key, type: string, | |
// description: 'Obtain API key from https://platform.openai.com/account/api-keys' | |
// }] |
import os | |
import subprocess | |
import multiprocessing | |
from colorama import Fore, Back, Style | |
def download_url(url): | |
flag = f'PID: {os.getpid()} --> 下载: {url}' |
// group by traceId, event fields and get the max item. | |
void testIt() { | |
List<Event> events = new ArrayList<>(); | |
events.add(new Event("AAA", "ROOM_START", 1000L, 10)); | |
events.add(new Event("AAA", "ROOM_START", 1000L, 10)); | |
events.add(new Event("BBB", "ROOM_START", 1002L, 15)); | |
events.add(new Event("BBB", "ROOM_START", 1001L, 10)); | |
// method1 | |
Map<String, Map<String, List<Event>>> collect = events.stream() |
在linux中,-
如果单独使用 - 符号,不加任何该加的文件名称时,代表"标准输入"的意思
如下小技巧,nc
命令来传输目录下多个文件
# host A, on receiver, go to destination directory and execute:
$ nc -l $port | tar xf -
# host B,on sender
package main | |
import ( | |
"io" | |
"fmt" | |
) | |
type Data struct { | |
stream string |
package main | |
import ( | |
"log" | |
"time" | |
"github.com/PuerkitoBio/goquery" | |
"github.com/briandowns/spinner" | |
) |
package main | |
import ( | |
"fmt" | |
"time" | |
"os" | |
"os/signal" | |
"syscall" | |
) |
function password_encode(password) | |
local bcrypt = require 'bcrypt' | |
return bcrypt.digest(password, 12) | |
end | |
function check_password(password, encoded_password) | |
local bcrypt = require 'bcrypt' | |
return bcrypt.verify(password, encoded_password) | |
end |
# Version 0.0.1 | |
FROM ubuntu:14.04 | |
MAINTAINER Beginman "xinxinyu2011@163.com" | |
ARG CHAINA_APT_SOURCE | |
RUN /bin/bash -c "if [[ ${CHAINA_APT_SOURCE} == ON ]];then sed -i 's#http://archive.ubuntu.com#http://mirrors.163.com#g' /etc/apt/sources.list; fi" | |
RUN apt-get update | |
RUN apt-get install -y lua5.1 | |
RUN apt-get install -y liblua5.1-dev | |
RUN apt-get install -y git | |
RUN apt-get install -y nginx |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.InputStreamReader; | |
public class Main { | |
/** | |
* 步骤: | |
* 1. File 创建文件句柄 |