吴楚衡

来找我吧!我的目标是星辰大海!


  • 首页

  • 归档99

  • 标签77

  • 分类17

  • 关于

  • 历史

  • 书单

  • 工具

  • 搜索

【github】使用github的小技巧

发表于 2019-11-16 | 更新于 2020-04-10 | 分类于 git

一搜索栏搜索语法

关键词 用法
language language:php 搜索的目标是用php
stars stars:>10000查找的项目星星要大于10000
pushed pushed:>2019-10-10 查找的项目最后推送时间要大于2019-10-10
in:name in:name laravel 项目的名称含有laravel这个词
in:readme in:readme framework 项目的README.md文件要有framework这个词
in:description in:description web项目描述含有web这个词

合起来就是language:php stars:>10000 pushed:>2019-10-10 in:name laravel in:readme framework in:description web ,然后回车搜索。
更多的语法参考官方文档

阅读全文 »

【CI/CD】php单元测试入门篇(一)-单元测试初探.

发表于 2019-11-09 | 更新于 2020-04-10 | 分类于 CI/CD

什么是单元测试?

 处理一件事流程越长, 码量就越多。如类的默认参数,如何确定运行时就是预期的参数。 如验证流程代码, 如何确定在错误流程面能验证出来,甚至进入异常流程?又如方法调用,又如何能确定调用后就是期待的数据?所以单元测试就是测试编写的代码是否按照自己的设想在代码里正常运行下去。

阅读全文 »

【PHP】PHP笔记-函数摘要

发表于 2019-10-28 | 更新于 2020-04-10 | 分类于 php

1 json__decode() 格式化输出

1
2
$json = '"{"status":"1","count":"1","info":"OK","infocode":"10000","lives":[{"province":"\u5e7f\u4e1c","city":"\u6df1\u5733\u5e02","adcode":"440300","weather":"\u6674","temperature":"20","winddire                                                                                                 ction":"\u897f\u5317","windpower":"\u22643","humidity":"74","reporttime":"2019-10-28 23:15:45}]}"';
json_encode($json, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);

加了参数JSON_PRETTY_PRINT和JSON_UNESCAPED_UNICODE后会格式化,在命令行打印就没那么乱了

阅读全文 »

【nodejs】七牛云视频瘦身demo

发表于 2019-10-25 | 更新于 2020-04-10

本demo 参考视频转码文档 官方demo和 转码说明文档写出来的.

demo

index.js

阅读全文 »

【笔录】偶悟笔录

发表于 2019-10-21 | 更新于 2020-04-10 | 分类于 心情文章

【2019-10-21】我在意人的眼光人的想法,那TA是否就限制了我?

 别人对我爱理不理,我恼怒,对于那些非善意的眼光或者失礼的眼光我是在意的,基于我自身的处世原则来评判TA的行为。从而有种超越想TA证明自己不比TA差比TA强,来证明TA的评估行为的错误的。
 基于这个基础上,结果会有2种结果,一种是TA比我优秀而我有进步的空间, 一种是确实比TA优秀,然后就没有然后, 除非遇到下一个TA。结论是:人的想法会限制住自己。那要是我不大意别人的想法别人的看法, 我还会被限制住吗?会!有一个人的想法是是谁也无法逃避了的,就是自己。
  再基于以上的基础上,就算自己不在意外人的看法不在意别人的想法的这个想法,我赢了,不再受TA人的想法干扰也就不再受他人限制。而这本身就是自己的想法,本身就被自己的想法限制住了。这时能取得多大的进步空间,取决于这个想法有多大,也就是梦想。果然,人最终的敌人还是自己。

【2019-10-21】是找答案好还是创造答案好?

  如题,你要是回答了这个问题,那么你的回答很可能是”好”或”不好”,或者其它的如:好也不好, 不好也好,可能好也可能不好…。不管这个答案是怎么样的,一旦回答了,也就被限制住了。如果非要 找一个条,创造答案本身就很难说,为一个问题创造答案本身就被问题给限制住在里面了,但只要这个答案没有被确定,又好像没有被限制住,因为在创造前它根据就不存在。所以创造答案会更好,它或许有意料不来的效果。

阅读全文 »

【php】php笔记-视频截图

发表于 2019-10-19 | 更新于 2020-04-10

开篇明义

  遇到一个有视频文件截图的需求,于是搜索了下用php来处理视频文件截图的案例,还真有!大概的处理方式是使用PHP-FFMpeg/PHP-FFMpeg库来实现的,而PHP-FFMpeg/PHP-FFMpeg又通过命令行来调用系统的FFMpeg视频处理程序并把视频文件传进去进行截图并保存。从而实现视频的截图。

系统环境参数

OS:centos 7.6
php-version: 7.2

阅读全文 »

【shell】.bashrc配置文件

发表于 2019-10-14 | 更新于 2020-04-10 | 分类于 linux
1
export editor=vim

【mysql】myqsl笔记-FQA记录

发表于 2019-10-10 | 更新于 2020-04-10 | 分类于 mysql

1 The user specified as a definer (‘xxx‘@’%’) does not exist when

当从另一台服务器的迁移一个库过来时并将数据库导入到另的用户(跟迁移过来的数据库的原来的用户名不同), 且原来的数据库的用户名并没有重新创建会报这个错误, 错误提示是原来数据库创建的view 当前的数据库找不到这个用户。 可以创建原来数据库的账户并把数据库的权限给TA。数据库授权参考《【mySQL】mySQL学习笔记-基本常识》

【php】php笔记-RSA加密解密(转)

发表于 2019-10-09 | 更新于 2020-04-10 | 分类于 php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
class Rsa
{
public $privateKey = '';

public $publicKey = '';

public function __construct()
{
$resource = openssl_pkey_new();
openssl_pkey_export($resource, $this->privateKey);
$detail = openssl_pkey_get_details($resource);
$this->publicKey = $detail['key'];
}

public function publicEncrypt($data, $publicKey)
{
openssl_public_encrypt($data, $encrypted, $publicKey);
return $encrypted;
}

public function publicDecrypt($data, $publicKey)
{
openssl_public_decrypt($data, $decrypted, $publicKey);
return $decrypted;
}

public function privateEncrypt($data, $privateKey)
{
openssl_private_encrypt($data, $encrypted, $privateKey);
return $encrypted;
}

public function privateDecrypt($data, $privateKey)
{
openssl_private_decrypt($data, $decrypted, $privateKey);
return $decrypted;
}
}


$rsa = new Rsa();
echo "公钥:\n", $rsa->publicKey, "\n";
echo "私钥:\n", $rsa->privateKey, "\n";

// 使用公钥加密
$str = $rsa->publicEncrypt('hello', $rsa->publicKey);
// 这里使用base64是为了不出现乱码,默认加密出来的值有乱码
$str = base64_encode($str);
echo "公钥加密(base64处理过):\n", $str, "\n";
$str = base64_decode($str);
$pubstr = $rsa->publicDecrypt($str, $rsa->publicKey);
echo "公钥解密:\n", $pubstr, "\n";
$privstr = $rsa->privateDecrypt($str, $rsa->privateKey);
echo "私钥解密:\n", $privstr, "\n";

// 使用私钥加密
$str = $rsa->privateEncrypt('world', $rsa->privateKey);
// 这里使用base64是为了不出现乱码,默认加密出来的值有乱码
$str = base64_encode($str);
echo "私钥加密(base64处理过):\n", $str, "\n";
$str = base64_decode($str);
$pubstr = $rsa->publicDecrypt($str, $rsa->publicKey);
echo "公钥解密:\n", $pubstr, "\n";
$privstr = $rsa->privateDecrypt($str, $rsa->privateKey);
echo "私钥解密:\n", $privstr, "\n";
}

源码来源

【linux】linux笔记-linux如何解压打开rar文件(转)

发表于 2019-10-05 | 更新于 2020-04-10 | 分类于 linux

How to Open, Extract and Create RAR Files in Linux

  RAR is a most popular tool for creating and extracting compressed archive (.rar) files. When we download an archive file from the web, we required a rar tool to extract them.
  RAR is available freely under Windows operating systems to handle compressed files, but unfortunately, rar tool doesn’t pre-installed under Linux systems.
  This article explains how to install unrar and rar command-line tools using official binary tar file under Linux systems to open, extract, uncompress or unrar an archive file.

Step 1: How to Install Unrar in Linux

On Debian and Ubuntu based distributions, you can easily install unrar package using the apt-get or apt program as shown.

阅读全文 »

1…345…10
吴楚衡

吴楚衡

IT菜鸟,写这个博客是防止未来把自己学习的东西给忘记了,也是为了自己学习的那点东西做下总结加深下印象,请多指教^_^!

99 日志
16 分类
76 标签
GitHub E-Mail
Links
  • hexo文档
  • 主题文档
  • linux学习平台
  • git使用手册
  • highlightjs
  • docker
  • cnlox
  • vim从入门到精通
  • 刺客博客
  • 算法牛人
  • 牛人
  • githhub开源书
  • 赖经纬
  • 徐庆业
  • next主题参考
粤ICP备17071471号 © 2020 吴楚衡
由 Hexo 强力驱动 v3.9.0
|
主题 – NexT.Mist v6.7.0
|
0%