Skip to content

Commit

Permalink
水滴穿石,非一日之功;没有量变,何来质变。种一棵树的最佳时间是十年前,其次是现在。
Browse files Browse the repository at this point in the history
  • Loading branch information
AtlantisDe committed Feb 9, 2020
1 parent 172e4e6 commit 86f32c2
Show file tree
Hide file tree
Showing 169 changed files with 2,881 additions and 182 deletions.
3 changes: 3 additions & 0 deletions API/Swagger/Swagger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Swagger

- [The Best APIs are Built with Swagger Tools | Swagger](https://swagger.io/)
5 changes: 5 additions & 0 deletions API/Tool/Api.Web.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Web APi TOOL

- [Getting Title at 25:12](https://apizza.net/)

## 常用
1 change: 1 addition & 0 deletions CDN/ICO/ICON.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ICO/ICON

- [Iconfont-阿里巴巴矢量图标库](https://www.iconfont.cn/)
- [Font Awesome](https://fontawesome.com/icons?from=io)
- [Font Awesome](https://fontawesome.com/?from=io)
- [图标下载,ICON(SVG/PNG/ICO/ICNS)图标搜索下载 - Easyicon](https://www.easyicon.net/)
Expand Down
43 changes: 43 additions & 0 deletions Cloud/tencent/Api/TencentCloud.Api.RecordCreate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
$way = "GET";//POST或GET二选一,注意是大写,不能写小写
$uri = "cns.api.qcloud.com";
$path = "/v2/index.php?";

// 密钥信息
$SecretKey = "aaa";
$param["SecretId"] = "bbb";

// 接口参数,
$param["Action"] = "RecordCreate";
$param["domain"] = "baidu.com";
$param["subDomain"] = "@";
$param["recordType"] = "A";
$param["recordLine"] = "默认";
$param["value"] = "127.0.0.1";
$param["ttl"] = "1800";

// 公共参数,不需要修改
$param["Nonce"] = rand();//生成随机数
$param["Timestamp"] = time();//当前时间戳
$param["Version"] = "2017-03-12";//api版本号


// 参数排序
ksort($param);
// 字符串拼接
$signStr = "";
foreach ( $param as $key => $value ) {
$signStr = $signStr . $key . "=" . $value . "&";
}
$signStr0 = "curl \"" . "https://" . $uri . $path . $signStr;
$signStr1 = "curl -d \"" . $signStr;
$signStr = $way . $uri . $path . substr($signStr, 0, -1);
// 生成签名
$signature = base64_encode(hash_hmac("sha1", $signStr, $SecretKey, true));
$finalsignature = urlencode($signature);

if($way == "GET")
echo $signStr0 . "Signature=" . $finalsignature . "\"";
else if($way == "POST")
echo $signStr1 . "Signature=" . $finalsignature . "\" \"https://" . $uri . $path . "\"";
?>
3 changes: 0 additions & 3 deletions Cloud/tencent/tencent.Net.md

This file was deleted.

17 changes: 17 additions & 0 deletions Cloud/tencent/tencent.SDK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Sdk

- [.NET - SDK 中心 - 腾讯云](https://cloud.tencent.com/document/sdk/.NET)
- [API 3.0 Explorer](https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms&SignVersion=)

## API 3.0 Explorer

- [API 3.0 Explorer](https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms)

```c#
Tencent Cloud SDK 3.0 for Python
Tencent Cloud SDK 3.0 for Java
Tencent Cloud SDK 3.0 for PHP
Tencent Cloud SDK 3.0 for Go
Tencent Cloud SDK 3.0 for NodeJS
Tencent Cloud SDK 3.0 for .NET
```
1 change: 1 addition & 0 deletions Cloud/tencent/tencent.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
## SDK

- [tencentyun/image-donet-sdk](https://github.com/tencentyun/image-donet-sdk)
- [TencentCloud/tencentcloud-sdk-dotnet](https://github.com/TencentCloud/tencentcloud-sdk-dotnet)

## API

Expand Down
4 changes: 4 additions & 0 deletions Database/FASTER/FASTER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# FASTER

- Microsoft.FASTER
- [microsoft/FASTER](https://github.com/Microsoft/FASTER/tree/master/cs)
16 changes: 16 additions & 0 deletions Database/LevelDB/LevelDB.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# LevelDB

```c#
//LevenDB.Net的写入速度非常高效,在单线程写入的情况都可以达到接近5W/秒的效率,而在获取上的效率更高5线程的并发读竟然可以达到15W/秒的能力....这读效果是相当的可观.
// 支持多线程,并发安全
```

- [google/leveldb](https://github.com/google/leveldb)
- [C#中使用多款 LevelDB.Net 封装测试性能 - 宋兴柱 - 博客园](https://www.cnblogs.com/songxingzhu/p/6009556.html)
- [LevelDB.NET 性能测试 - 泥水佬的个人页面 - OSCHINA](https://my.oschina.net/ikende/blog/304924?p={{currentPage-1}})
- [给 C# .NET 兄弟们做点小贡献 - NoSql LevelDB .net 移植版 普通 PC 100 万条数据插入不超过 4 秒-CSDN 论坛](https://bbs.csdn.net/topics/390448297)

## boost

> 1. boost 1.59.0
> 2. [Version 1.59.0](https://www.boost.org/users/history/version_1_59_0.html)
12 changes: 12 additions & 0 deletions Database/LevelDB/Leveldb.net/Leveldb.net.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Leveldb.net

- [oodrive/leveldb.net](https://github.com/oodrive/leveldb.net)

## 常用

```c#
var options = new LevelDB.Options { CreateIfMissing = true };
var db = new LevelDB.DB(options, @"C:\temp\tempdb");


```
3 changes: 3 additions & 0 deletions Database/LiteDB/LiteDB.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# LiteDB

- [mbdavid/LiteDB](https://github.com/mbdavid/LiteDB)
4 changes: 4 additions & 0 deletions Database/MongoDB/MongoDB.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# MongoDB

- [MongoDB Download Center](https://www.mongodb.com/download-center)
- [Build software better, together](https://github.com/topics/mongodb)
- [meteor/meteor](https://github.com/meteor/meteor)

## 教程

- [MongoDB 教程 | 菜鸟教程](http://www.runoob.com/mongodb/mongodb-tutorial.html)

## Windows 安装

- [Install MongoDB Community Edition on Windows &mdash; MongoDB Manual](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/)

1. Select the server you would like to run:

> [MongoDB Download Center](https://www.mongodb.com/download-center/community)
Expand Down
3 changes: 3 additions & 0 deletions Database/Oracle NoSQL Database/Oracle NoSQL Database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Oracle NoSQL Database

- [Oracle NoSQL Database Downloads](https://www.oracle.com/database/technologies/nosql-database-server-downloads.html)
12 changes: 12 additions & 0 deletions Database/Redis/FAQ/Redis.FAQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Redis.FAQ

- [�� 请检查 Redis 日志,了解有关错误的详细信息。 - Mr_Yun - 博客园](https://www.cnblogs.com/yunwangjun-python-520/p/11300715.html)

## 常见错误

### 1. 解决---MISCONF Redis 被配置为保存 RDB 快照,但目前无法在磁盘上存留。可能修改数据集的命令被禁用。请检查 Redis 日志,了解有关错误的详细信息

```c#
// 在启动redis服务后,输入下面命令就可以了,在启动就好了
config set stop-writes-on-bgsave-error no
```
109 changes: 109 additions & 0 deletions Database/Redis/Redis.Code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Redis

- [redis 命令手册](https://www.redis.net.cn/order/)
- [Sentinel &mdash; Redis 命令参考](http://redisdoc.com/topic/sentinel.html)
- [Redis 性能问题排查解决手册(七) - 蘑菇先生 - 博客园](https://www.cnblogs.com/mushroom/p/4738170.html#three)

```c#
// Redis 管道技术
// Redis是一种基于客户端-服务端模型以及请求/响应协议的TCP服务。这意味着通常情况下一个请求会遵循以下步骤:
// 客户端向服务端发送一个查询请求,并监听Socket返回,通常是以阻塞模式,等待服务端响应。
// 服务端处理命令,并将结果返回给客户端。
```

## 常用命令

```c#
redis-cli.exe -h 127.0.0.1 -p 6379
redis-cli.exe -h 192.168.3.6 -p 6379
Redis-cli --latency -h 127.0.0.1 -p 6379

AUTH "password"
ECHO message
PING
// 如果连接正常就返回一个 PONG ,否则返回一个连接错误。
QUIT

info server
info clients
info memory
info persistence
info stats
info replication
info cpu
info commandstats
info cluster
info keyspace

SELECT index
SET db_number 0
SELECT 1
GET db_number
SET db_number 1
GET db_number
SELECT 3
SELECT 2

CLIENT LIST
// 删除所有数据库的所有key
FLUSHALL
// 删除当前数据库的所有key
FLUSHDB
// 返回最近一次 Redis 成功将数据保存到磁盘上的时间,以 UNIX 时间戳格式表示
LASTSAVE
// 以下实例演示了发布订阅是如何工作的。在我们实例中我们创建了订阅频道名为 redisChat:
SUBSCRIBE redisChat
PUBLISH redisChat "Redis is a great caching technique"
PUBLISH redisChat "Learn redis by runoob.com"
config get maxclients
KEYS
// 可以看到所有库的key数量
info
// 则是当前库key的数量
dbsize
// 这种数据量小还可以,大的时候可以直接搞死生产环境。
keys *
// dbsize和keys *统计的key数可能是不一样的,如果没记错的话,keys *统计的是当前db有效的key,而dbsize统计的是所有未被销毁的key(有效和未被销毁是不一样的,具体可以了解redis的过期策略)
redis-benchmark -h 127.0.0.1 -p 6379 -t set,lpush -n 10000 -q
RPUSH list1 "foo"
RPUSH list1 "bar"
LLEN list1

LINDEX list1 -1
LINDEX list1 0
LINDEX list1 1

LRANGE list1 0 -1


KEYS app_ILogsItems
LLEN app_ILogsItems
LRANGE app_ILogsItems 0 -1
LTRIM app_ILogsItems 0 10000
LTRIM app_ILogsItems 1000 50000
LLEN app_ILogsItems

LLEN KEY_NAME

LTRIM mylist 1 -1

PTTL KEY_NAME
// 返回值
// 当 key 不存在时,返回 -2 。 当 key 存在但没有设置剩余生存时间时,返回 -1 。 否则,以毫秒为单位,返回 key 的剩余生存时间。
// 注意:在 Redis 2.8 以前,当 key 不存在,或者 key 没有设置剩余生存时间时,命令都返回 -1 。
-2
-1
PTTL key

Expire KEY_NAME TIME_IN_SECONDS
// 设置了过期时间为 1 分钟
EXPIRE runooobkey 60
KEYS *
KEYS w3c*

```

### 1. 发布订阅机制

- [Redis 发布订阅机制 - yitudake - 博客园](https://www.cnblogs.com/yitudake/p/6747995.html)
34 changes: 27 additions & 7 deletions Database/Redis/Redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,48 @@

- Redis 是一个开源(BSD 许可),内存数据结构存储,用作数据库,缓存和消息代理。它支持数据结构,如字符串,散列,列表,集合,带有范围查询的排序集,位图,超级日志,具有半径查询和流的地理空间索引。Redis 具有内置复制,Lua 脚本,LRU 驱逐,事务和不同级别的磁盘持久性,并通过 Redis Sentinel 提供高可用性并使用 Redis Cluster 自动分区。
- [Redis 常用命令](https://blog.csdn.net/hanjun0612/article/details/93513640)
- [关于 Redis 处理高并发 - 伍萬磊 - 博客园](https://www.cnblogs.com/wanlei/p/10464517.html)
- [三、Signalr WebApi 客服-客户链接+Redis(集群扩展) - 十色鹿 - 博客园](https://www.cnblogs.com/fger/p/12119396.html)
- [Redis Dbsize 命令\_返回当前数据库的 key 的数量](https://www.redis.net.cn/order/3671.html)
- [redis 命令手册](https://www.redis.net.cn/order/)
- [Redis 干货分享 | Redis 访问控制列表(ACL)](https://mp.weixin.qq.com/s?__biz=MzUyODQ3MTgwOA==&mid=2247484617&idx=1&sn=fe08c4d06d0e2c960f074269eb55c223&chksm=fa6e86a6cd190fb0bdf066907e1884494e87e76ea5e844f679a07d6a44c55ccbec8acb1703ae&mpshare=1&scene=23&srcid=&sharer_sharetime=1579266625329&sharer_shareid=640265f8528f9fcff9d08d1ab417b576#rd)

## official

-[Redis](https://redis.io/)
- [Redis](https://redis.io/)
- [antirez/redis](https://github.com/antirez/redis)
- [Redis](https://redis.io/download)

## redis 常用类库

```c#
安装CSRedisCore 3.3.0 可以扩展集群的好像
StackExchange.Redis
NewLife.Redis
```

## Redis 教程

- [Redis 简介 | 菜鸟教程](http://www.runoob.com/redis/redis-intro.html)

```c#
1 运行cmd
// 1 运行cmd
redis安装目录,cmd输入redis-cli.exe -h 127.0.0.1 -p 6379
// 到redis安装目录,cmd输入
redis-cli.exe -h 127.0.0.1 -p 6379
redis-cli.exe -h 10.88.60.172 -p 6379

2 密码登录
// 2 密码登录
auth 输入密码

3 设置和获取 set "hello"   get "hello"
// 3 设置和获取 set "hello"   get "hello"
4 清空  flushall
// 4 清空
flushall

5 选择数据库  select 1
// 5 选择数据库
select 1

```

Expand All @@ -45,6 +64,7 @@ sudo apt-get install redis-server

## Window 下安装

- 3.2.100
- 下载地址 [MSOpenTech/redis/releases](https://github.com/MSOpenTech/redis/releases)

```shell
Expand Down
9 changes: 9 additions & 0 deletions Database/Redis/Window/Redis.Window.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Redis.Window

- [antirez/redis](https://github.com/antirez/redis)
- [Redis](https://redis.io/download)
- [redis 下载和安装](http://www.redis.com.cn/download)

## 常识

- 当前稳定版:3.2
32 changes: 32 additions & 0 deletions Database/Redis/uncategorized/Redis.List.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Redis 列表(List)

## 常用

```c#
redis 127.0.0.1:6379> LPUSH runoobkey redis
redis 127.0.0.1:6379> LPUSH runoobkey mongodb
redis 127.0.0.1:6379> LPUSH runoobkey mysql

redis 127.0.0.1:6379> LRANGE runoobkey 0 10
1) "mysql"
2) "mongodb"
3) "redis"
// 在以上实例中我们使用了 LPUSH 将三个值插入了名为 runoobkey 的列表当中。
LPUSH app_mqlist redis
LPUSH app_mqlist redis
LPUSH app_mqlist redis1
LPUSH app_mqlist redis2
LPUSH app_mqlist redis3

LRANGE app_mqlist 0 10

RPUSH app_mqlist end1


LRANGE app_mqlist 6 11
LRANGE app_mqlist 6 999



```
Loading

0 comments on commit 86f32c2

Please sign in to comment.