Skip to content

Instantly share code, notes, and snippets.

View menyf's full-sized avatar
🎯
Focusing

Yifan Men menyf

🎯
Focusing
View GitHub Profile
http://paste.ubuntu.com/23654022/
Office手动激活命令:
cd C:\Program Files\Microsoft Office\Office15
cscript ospp.vbs /sethst:192.168.123.1
cscript ospp.vbs /act
cscript ospp.vbs /dstatus
windows手动激活命令
//
// ___FILENAME___
// Created by ___FULLUSERNAME___ on ___DATE___.
#include <set>
#include <map>
#include <list>
#include <stack>
#include <cmath>
#include <queue>
#include <cstdio>
//
// ___FILENAME___
// Created by ___FULLUSERNAME___ on ___DATE___.
import java.math.*;
import java.util.*;
public class Main{
static BigInteger zero = BigInteger.valueOf(0);
static BigInteger one = BigInteger.valueOf(1);
static BigInteger two = BigInteger.valueOf(2);
public static void main(String[] args)
@menyf
menyf / VPS_init.sh
Last active April 1, 2017 03:19
VPS_init
#!/usr/bin/env bash
# 说明
# 1. 修改ssh配置,端口改为ssh_port
# 2. 安装shadowsocks,端口为shadowsocksport,密码为shadowsockspwd
# 3. 安装pip
# 4. 安装BBR
# 5. 安装python3.6、pip3、easy_install
# 6. 重启
@menyf
menyf / macvim.md
Last active June 18, 2017 02:45
mccvim with youcompleteme

Install vim

brew install macvim --with-override-system-vim

添加alias

alias vi='vim'
@menyf
menyf / OfficeCodePrettify
Created June 18, 2017 02:36
VB宏 格式化代码
'script to high light code In document
' for vb script 宏
Private Function isKeyword(w) As Boolean
Dim keys As New Collection
With keys
.Add "if": .Add "else": .Add "elseif": .Add "case": .Add "switch": .Add "break"
@menyf
menyf / cpp
Created January 26, 2018 09:01
random_double
#include <random>
class Random {
public:
Random(double low, double high) {
rd = new std::random_device;
gen = new std::mt19937((*rd)());
dis = new std::uniform_real_distribution<double>(low, high);
}
~Random() {
delete dis;
@menyf
menyf / byrbt.py
Last active February 19, 2018 11:23
byrbt的free种子通知脚本
import requests, re, time, smtplib
from email.mime.text import MIMEText
from email.utils import formataddr
def mail(Subject):
my_sender='[email protected]' # 发件人邮箱账号
my_pass = 'your_pwd' # 发件人邮箱密码(当时申请smtp给的口令)
my_user='[email protected]' # 收件人邮箱账号,我这边发送给自己
ret=True
try:
#include <string>
#include <iostream>
#include <vector>
#include <fstream>
#include <cstdio>
using namespace std;
struct Point
{
double x, y, z;
};
//10010.js
//https://alipay.10010.com/mobileWeChatApplet/home/queryUserInfo.htm?mobile=132411234567&stoken=d72b03f54baa6756bbbae87a85a462c554a1ed9b6c4bf5517ab53161951ec1267702f5bf567c5a1fe391c5804ee6789&loginCode=061ienbX0ZfUa12unieX0aTEbX0ihdis
var mobile = "132411234567"
var stoken = "d72b03f54baa6756bbbae87a85a462c554a1ed9b6c4bf5517ab53161951ec1267702f5bf567c5a1fe391c5804ee6789"
var loginCode = "061ienbX0ZfUa12unieX0aTEbX0ihdis"
var bgcolor = $color("clear")
var generalInfo
var dataPlan