Skip to content

Instantly share code, notes, and snippets.

mkdir -p /etc/docker
cat << EOF > /etc/docker/daemon.json
{
"registry-mirrors": [
"https://hub-mirror.c.163.com",
"https://mirror.baidubce.com"
]
}
EOF
systemctl restart docker
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
class Faberge {
public static Map<String, BigInteger> cache = new HashMap<>();
public static BigInteger fNoCache(BigInteger n, BigInteger m) {
if (n.equals(BigInteger.ZERO) || m.equals(BigInteger.ZERO)) {
@wusisu
wusisu / delete_all.js
Created April 19, 2020 14:30
浏览器 js 脚本删除 google photos 所有照片
// How many photos to delete?
// Put a number value, like this
// const maxImageCount = 5896
const maxImageCount = "ALL_PHOTOS";
// Selector for Images and buttons
const ELEMENT_SELECTORS = {
checkboxClass: '.ckGgle',
deleteButton: 'button[title="删除"]',
confirmationButton: '#yDmH0d > div.llhEMd.iWO5td > div > div.g3VIld.V639qd.bvQPzd.oEOLpc.Up8vH.J9Nfi.A9Uzve.iWO5td > div.XfpsVe.J9fJmf > button.VfPpkd-LgbsSe.VfPpkd-LgbsSe-OWXEXe-k8QpJ.nCP5yc.kHssdc.HvOprf'
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9A+jjYPeOI6TjeNbbJL7voSKjLzW0fLlCeAfSltJ/F907upDePC0y9502LVDJfUp0L/JNVjaLAQufll3Vcw6u0+Gbbc+0xcoZ6JOMMCDKUtnxl6mOMUp4QrOgLjzBV7SP+pSXXbMOWjtZ22/PZYmuAehY6HjTQ5FrS7xaHD0YfTMYxTEmjQystIPPN+rO6ZoSNZBHPJn5v9Lxldz/nLtimoYQSy0G700PhP6+SJl/QO08cr6PH+qTJdt34Wj0m6V4AiI6sZUKbhretKdjLlc87ZKJOA8Xa9BFI4qBKD0UZ/42thQqEZms2A1O3ilWqyyngagFJX2na/Fd2pQBGuEL
@wusisu
wusisu / interface
Created May 17, 2019 08:38
static interface
auto ens18
iface ens18 inet static
address 192.168.0.49
netmask 255.255.255.0
gateway 192.168.0.4
dns-search codingprod.net
dns-nameservers 192.168.0.4 114.114.114.114
syntax = "proto3";
package proto;
option java_generic_services = true;
option java_package = "proto.git";
option java_outer_classname = "THubAuthProto";
@wusisu
wusisu / install-docker-china.sh
Last active December 9, 2018 07:51
install docker
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu \
$(lsb_release -cs) \
@wusisu
wusisu / Main.java
Created June 7, 2018 14:02
Hashmap Concurrent
import java.util.HashMap;
public class Main {
public static HashMap<String, String> map = new HashMap<>();
public static class Work implements Runnable {
private boolean add;
private long start;
Work(boolean add) {
const Minganci = ['+1s', '轮子哥']
const String = 'ajsldkfja+1sjsdjwoi轮子哥jsodifj'
const ALL = {}
const putInWord = (word, box)=> {
if (!word) return
if (word.length === 1) return box[word] = true
const c = word[0]
if (box[c] === true) return
if (!box[c]) box[c] = {}
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import os, sys
import fnmatch
listonly = False
skipexts = ['.js']
def visitfile(fname,searchkey):
global fcount,vcount,list_of_contain_lines
try: