Fish-终端斗地主
介绍想不到有一天我也能在写代码的同时还能斗一把小地主!
这种休闲 摸鱼 模式想法来自逛掘金时看到这篇文章 高端程序员上班摸鱼指南 介绍的Ratel。有兴趣的小伙伴可以直接搜索Ratel具体了解。本着一个探索瞎折腾的心,决定仿照Ratel实现自己的Fish项目。
这款游戏基于Golang实现,目前仅支持PVP模式,后续有时间再支持更多的模式。
项目地址https://github.com/yangchen5710/fish_client
技术栈
Golang
SocketIO
安装首先下载编译,确保本地安装有Golang环境
123git clone git@github.com:yangchen5710/fish_client.gitcd fish_clientgo build fish_client
接下来在终端下执行可执行文件
windows
1client.exe 47.101.212.202 8096
linux/macos
1./client 47.101.212.202 8096
玩法
出牌规则所有牌型:
1234┌──┐──┐──┐──┐──┐──┐ ...
2023年个人总结
把稳工作,稳步前行2023年,我还是老样子,准时上下班。老婆和我两个人的公积金和一部份工资也能抵掉每个月1W多的房贷。值得庆祝的是,我们在23年的年底再次的提前还了10W(计划每年能提前还10W),算是完成了23年的一个小目标了。今年,小孩也顺利的上幼儿园了。作为90后,我倒是没有像别人说的小孩从小就开始卷的焦虑,一切随缘了,健健康康就行。
学点新玩意,比如Golang今年我顺便学了学Golang。原本一直用PHP,但是现在的就业形势太严峻了,所以学习了新技能,也算自我充电了。顺便用golang写了一个在终端里面玩斗地主的小游戏(用来摸鱼,嘻嘻)
居转户遇到挫折年初时有提交居转户的申请,走的是7+中级职称。中级职称是22年底拿到的。本来计划好23年可以在上海落户,但是申请被打回了,原因是我之前一段时间的9个月的社保由于前东家当时的注册地迁到外地了,所以那段时间的社保不能算,建议我往后延迟9个月再申请。没办法只能等到明年2月份了,好在时间不长,再过一个月我就可以继续申请了,但愿能够成功。
展望未来嗯,2024年,就两个字,活着!继续稳步前行!然后嘛,工作稳定,家人健康!
新年计划
把居转 ...
实现接入tp6 think-swoole rpc服务
公司多个项目之前用的TP3.2,去年部份项目升级为TP6,并使用了JSONRPC服务,使用了TP6官方插件 think-swoole中rpc服务,实现了rpc客户端和服务端,但从便携性上讲,需要项目都是TP6才能快速接入rpc服务。之前部份老项目由于升级成本过大,迟迟没有升级到TP6。由于某些模块需要在新老项目中都需要用到,所以会容易造成新老项目中相同模块中的代码逻辑不一致的问题。为了解决这个问题,去看了下think-swoole中关于rpc服务的代码,按照里面的逻辑,仿照写了一个调用rpc服务的客户端类。代码如下:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107<?php$orderRpc = new C ...
开发微信小程序的个人感想
不同时期的生活方式是非常不一样的。我觉得最重要的是意识到这一点,不要以为某一种生活方式会一直延续下去。这个世界上不会存在特定的程序员生活方式,你在不同的公司工作就会遇到不一样的公司文化,你的人生处于不同的阶段也会做出不同的选择。 加上最近公司的业务不是特别繁忙,于是乎就折腾一下自己,充充电。结合公司的前端项目是用微信小程序开发的,且小程序已经上线了(有兴趣的同学可以扫描二维码看看) 所以本着一颗全栈的心,决定模仿一下公司的小程序,并在此基础上加上一些自己的想法。小程序后端用的是laravel,前端用原生写的,有想过采用uni-app来开发,不过最后还是决定采用原生来写,因为我觉得如果想了解熟悉微信小程序的话,一开始先用原生写比较好一点,之后转uni-app也是可以的。找UI要来改版后的小程序UI图,开干!!!!!由于首页是改版后的,所以决定直接按照UI来,下面放几张图对比下公司小程序-首页:自己模仿后的首页:公司小程序-福利购:自己模仿后的福利购:公司小程序-我的:无力吐槽,公司小程序-我的页面长的好丑,可能萝卜青菜,各有所爱吧。既然无法满足自己的审美观,那就只能自己 ...
记一次破解某APP的心路历程
说实话,在写这篇博文前,我很纠结,担心会不会被查水表。由于已经和APP所属的公司客服沟通过贵公司的APP存在很严重的安全漏洞,但是得到的答复很敷衍,所以在这里公开分享自己的破解过程(以下部分内容由于涉及到隐私以及相关用户信息所以做了打码),纯粹为了技术探究,并引起相关公司的重视,切勿恶意根据文章内容肆意破坏相关单位权益。
相关工具:charles,google浏览器
1.通过charles抓到app相关页面,抓取过程省略,下面放下已经写好的代码片段其中抓取到用户排行榜的页面,话不多说,直接用google浏览器->F12->查看返回的数据结构和信息是谁给了你这么大的勇气直接明文返回了用户的这么多信息。通过分析,用户的pwd即用户的密码使用md5加密的,虽然我们都知道md5加密是不可逆的,但是现在网上很多解谜库,大概率可以逆向破解成功。直接放图用户的手机号和密码都掌握了,直接可以登陆app,不过没有登陆过app,怕查水表,就不演示了。上面还只是初步的探索了一下,就很容易的窃取到了用户的相关敏感信息。重头戏来了。接下来分析了这个页面所加载的js文件,发现app前端后端通信所用的加 ...
分享自己写的关于顺丰同城配送的扩展包
公司项目需要用到顺丰外卖,所以看了下有没有现成的扩展包可用,但是发现没有,官方也没有SDK,所以自己写了一个包,省了不少工作量。
安装1$ composer require ycstar/sfopenic -vvv
配置在使用本扩展之前,你需要去顺丰同城开放平台注册账号,然后申请开发者ID,获取相应的配置
使用123456789use Ycstar\Sfopenic\Sfopenic;$config = [ 'host' => 'xxxxxxxxxxxx', 'dev_id' => 'xxxxxxxxxxxx', 'dev_key' => 'xxxxxxxxxxxx'];$sfopenic = new Sfopenic($config);
订单管理预创建订单(店铺)1234567891011121314$data = [ 'shop_id' => 'xxxxxxxxxxxx ...
gitlab使用docker安装
环境
centos7
内存最低不小于4G
docker
下载gitlab镜像 1234567891011 # 搜索镜像 docker search gitlab # 下载镜像 docker pull gitlab/gitlab-ce:10.5.7-ce.0 # 下载完成之后 docker iamges 命令可以查看 [root@localhost ~]# docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEmysql latest 5b4c624c7fe1 33 hours ago 519MBgitlab/gitlab-ce 10.5.7-ce.0 e5315b99f490 4 years ago 1.46GB
启动镜像 12345678910 docker run \-itd \--publi ...
国密平安银行小程序对接
对接平安银行小程序,开发文档写的还行,只是这加解密的方式实在有点费脑子,在咨询了同事之后了解平安银行的加解密的方式为sm2,sm4,且仅支持这两种方式。不了解国密的可以看看这篇文章 国密招商银行对接。本扩展依赖于 lpilp/guomi扩展包,在这里感谢此扩展包作者的开源。使我的对接工作减轻了不少。
安装1$ composer require ycstar/obpmini -vvv
配置在使用本扩展之前,你需要去平安银行开放银行注册账号,然后申请开发者,获取相应的配置
使用12345678910 use Ycstar\Obpmini\Obp; $config = [ 'appid' => 'xxxxxxx', 'secret_key' => 'xxxxxxxxxxxxx', 'public_key' => 'xxxxxxxxxxxxxxxxxx', 'private_key' => 'xxxxxxxxxx ...
从放弃svn到拥抱git之路
基础概念 GIT是一种版本控制软件,那就首先了解一下什么是 “版本控制”?
比较官方的解释是,版本控制系统是一种记录一个或若干个内容变化,以便将来查询特定版本修订情况的系统。
简言之,你的修改只要提到到版本控制系统,基本都可以找回,版本控制系统就像一台时光机器,可以让你回到任何一个时间点。
了解了版本控制系统的功能,我们知道就算你把代码改的一塌糊涂,照样可以恢复到我们过去的任何一个时间点,工作量却微乎其微。是不是很amazing。
总结一下版本控制系统有哪些优点:
记录文件所有历史变化。这是版本控制系统的基本能力;
随时恢复到任意时间点。历史记录功能使我们不怕改错代码了;
支持多功能并行开发。通常版本控制系统都支持分支,保证了并行开发的可行;
多人协作并行开发。对于多人协作项目,支持多人协作开发的版本管理将事半功倍;
常见管理版本控制工具
SVN(Subversion)
SVN是曾经最流行的版本管理系统,很多人都有用过,因而对于集中式版本控制系统很多人都很了解它。
优点:
适合多人团队协作开发
代码集中化管理
缺点:
单点故障
必须联网, ...
hexo使用说明
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment