-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
水滴穿石,非一日之功;没有量变,何来质变。种一棵树的最佳时间是十年前,其次是现在。
- Loading branch information
1 parent
172e4e6
commit 86f32c2
Showing
169 changed files
with
2,881 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/) | ||
|
||
## 常用 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . "\""; | ||
?> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
|
||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# LiteDB | ||
|
||
- [mbdavid/LiteDB](https://github.com/mbdavid/LiteDB) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Redis | ||
|
||
- [redis 命令手册](https://www.redis.net.cn/order/) | ||
- [Sentinel — 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
||
|
||
``` |
Oops, something went wrong.