Hack Jetbrains

Jetbrains全家桶 https://3.jetbra.in jetbra.zip-readme.txt 1. add -javaagent:/path/to/ja-netfilter.jar=jetbrains to your vmoptions (manual or auto) 2. log out of the jb account in the 'Licenses' window 3. use key on page https://jetbra.in/5d84466e31722979266057664941a71893322460 4. plugin 'mymap' has been deprecated since version 2022.1 5. don't care about the activation time, it is a fallback license and will not expire Jetbrains Toolbox GoLand -> Settings -> Configuration -> show... -> GoLand.app.vmoptions 在vmoptions文件最后增加以下内容 -javaagent:/path/jetbra/ja-netfilter.jar=jetbrains # jdk17 need --add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED --add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED 获取key,看readme.txt中的url 新版本区域选择的坑 如果你选择 China Mainland 将会有一个比较坑的地方:激活许可验证走 account.jetbrains.com.cn 这个域名,而不是默认的 account.jetbrains.com ...

December 27, 2022 · 1 min · zhangxiaofeng05

代码管理

git 每个仓库设置Git用户名 git config --global user.name "username" git config --global user.email "email address" 一个仓库设置Git用户名 git config user.name "username" git config user.email "email address" https://docs.github.com/cn/get-started/getting-started-with-git/setting-your-username-in-git # 生成ssh-key ssh-keygen -t rsa -C "email address" # 测试链接GitHub ssh -T git@github.com GitHub https://cli.github.com/

October 20, 2022 · 1 min · zhangxiaofeng05

Aliyun用nginx配置https

首先在阿里云购买域名,申请域名证书,可以免费申请一年 nginx配置https过程 https://yq.aliyun.com/articles/672835 示例 server { listen 444 ssl; server_name zhangxiaofeng.top localhost; # ssl证书地址 ssl_certificate /etc/nginx/cert/4879361_zhangxiaofeng.top.pem; # pem文件的路径 ssl_certificate_key /etc/nginx/cert/4879361_zhangxiaofeng.top.key; # key文件的路径 # ssl验证相关配置 ssl_session_timeout 5m; #缓存有效期 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; #加密算法 ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #安全链接可选的加密协议 ssl_prefer_server_ciphers on; #使用服务器端的首选算法 #charset koi8-r; #access_log /var/log/nginx/host.access.log main; location / { root /usr/share/nginx/html; index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } 访问: https://zhangxiaofeng.top:444 ...

January 10, 2021 · 1 min · zhangxiaofeng05

git 配置

github git https://docs.github.com/zh/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent vim ~/.ssh/config Host github.com User git Hostname ssh.github.com PreferredAuthentications publickey IdentityFile ~/.ssh/id_ed25519 Port 443 测试连接ssh -T git@github.com https://stackoverflow.com/questions/15589682/ssh-connect-to-host-github-com-port-22-connection-timed-out ssh-socket代理 访问GitHub慢,下载慢的解决办法。 创建config文件 vi ~/.ssh/config # 当然你也可以手动在 C:\Users\Username\.ssh 下创建 config 文件 文件写入如下内容 # 这里的 -a none 是 NO-AUTH 模式,参见 https://bitbucket.org/gotoh/connect/wiki/Home 中的 More detail 一节 ProxyCommand connect -S 127.0.0.1:1080 -a none %h %p Host github.com User git Port 22 Hostname github.com # 注意修改路径为你的路径 IdentityFile "C:\Users\zhang\.ssh\id_rsa" TCPKeepAlive yes Host ssh.github.com User git Port 443 Hostname ssh.github.com # 注意修改路径为你的路径 IdentityFile "C:\Users\zhang\.ssh\id_rsa" TCPKeepAlive yes 参考文章: https://upupming.site/2019/05/09/git-ssh-socks-proxy/ ...

June 1, 2020 · 1 min · zhangxiaofeng05

Nextcloud云盘

维基百科 Nextcloud Nextcloud是一套用于创建网络硬盘的客户端-服务器软件。其功能与Dropbox相近,但Nextcloud是自由及开放源代码软件,每个人都可以在私人服务器上安装并运行它。 与Dropbox等专有服务相比,Nextcloud的开放架构让用户可以利用应用程序的方式在服务器上新增额外的功能,并让用户可以完全掌控自己的数据。 ownCloud原先的开发者弗兰克·卡利切创建了ownCloud的分支——Nextcloud,继而让卡利切与其他原先的ownCloud团队成员持续积极地开发。 特性 Nextcloud的文件存储在一般的目录结构中,并可透过WebDAV访问。用户的文件会在传输时加密。Nextcloud可与在Windows(Windows XP、Vista、7与8)、macOS(10.6或更新版本)或是多种Linux散布版上运行的客户端同步。 Nextcloud用户可以管理日历(使用CalDAV)、联系人(CardDAV)、计划工作与流媒体(Ampache)。 从管理的角度来看,Nextcloud允许用户与组群管理(透过OpenID或LDAP)。透过用户间与/或组群间的读/写权限调整达到分享文件的目的。另外,Nextcloud的用户可以创建公开的URL来分享文件。也可以记录与文件相关的动作,以及利用文件访问规则来禁止对特定文件的访问。 此外,用户也可以透过浏览器使用Nextcloud的文本编辑器、书签服务、缩略网址服务、相册、RSS阅读器与文件查看器。因为有良好的扩展性,Nextcloud可以透过鼠标点一下即可完成安装的应用程序强化其功能,并可连线至Dropbox、Google云端硬盘与Amazon S3。 架构 为了让个人电脑与Nextcloud服务器同步,Windows、macOS、FreeBSD或Linux上都有客户端可以使用。行动客户端则在iOS与Android设备上提供。也可以使用浏览器访问、管理与上传任何文件与数据。任何在设置好同步的文件系统上的变更都会推送到所有链接到该用户账号的电脑与移动设备上。 Nextcloud服务器是以PHP与JavaScript脚本语言撰写。对于远程访问,它采用的是SabreDAV,其为一开放源代码的WebDAV服务器。Nextcloud可与多种数据库管理系统一同运作,包含了SQLite、MariaDB、MySQL、Oracle数据库与PostgreSQL。 centos7安装 官方安装指南: https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html 环境 LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.7.1908 (Core) Release: 7.7.1908 Codename: Core PHP 7.2.27 (cli) (built: Jan 26 2020 15:49:49) ( NTS ) Server version: 5.5.64-MariaDB MariaDB Server Nextcloud 17.0.5 Nextcloud官网: https://nextcloud.com/ 安装httpd(apache),php,php-fpm,MariaDB 自行百度,谷歌.如果服务器上还有nginx,建议apache更改默认端口 /etc/httpd/conf/httpd.conf(我的改为7000) php-fpm默认端口9000 ps:安装php-fpm需要注意版本是否支持要安装nextcloud版本 下载nextcloud https://nextcloud.com/changelog/ 下载nextcloud-17.0.5.zip,解压至/var/www /var/www/nextcloud是根目录,有index.php,在此目录下新建目录data cd /var/www/nextcloud/ mkdir data cd /var/www chmod -R 755 nextcloud/ chown -R apache:apache nextcloud/ 配置httpd vim /etc/httpd/conf.d/nextcloud.conf ...

April 4, 2020 · 1 min · zhangxiaofeng05

deepin编译安装Python3.6

官网下载源码 官网:https://www.python.org/downloads/source/ cd /opt/python/ sudo wget https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tar.xz sudo xz -d Python-3.6.10.tar.xz sudo tar xvf Python-3.6.10.tar cd Python-3.6.10/ sudo ./configure --prefix=/usr/local/python3.6 sudo make sudo make install sudo ln -s /usr/local/python3.6/bin/python3 /usr/bin/python3.6 虚拟环境 python3.6 -m venv ./env #创建虚拟环境 source env/bin/activate #激活虚拟环境 python官方文档 https://docs.python.org/zh-cn/3/library/venv.html

January 18, 2020 · 1 min · zhangxiaofeng05

deepin安装使用Oh My Zsh

安装Oh My Zsh github地址: https://github.com/ohmyzsh/ohmyzsh sudo apt install zsh sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # 将 Zsh 设置为默认 Shell chsh -s /bin/zsh # 查看当前所用的 Shell echo $SHELL # 查看系统内已安装的 Shell cat /etc/shells ps:root执行此脚本只能root使用Oh My Zsh,其他用户使用需要在那个用户下执行此安装脚本 更换主题 vi ~/.zshrc #ZSH_THEME="robbyrussell" ZSH_THEME="agnoster" #ZSH_THEME="amuse" #ZSH_THEME="fishy" #ZSH_THEME="ys" source ~/.zshrc agnoster主题箭头无法正常显示 检查是否安装PowerlineSymbols字体 如果没有安装,官方安装文档 https://powerline.readthedocs.io/en/latest/installation.html 在终端选择能够正常显示箭头的字体 PowerlineSymbols,DejaVu Sans Mono 安装字体参考: https://github.com/powerline/fonts 比如: sudo apt-get install fonts-powerline,以GitHub为准。 deepin 15.11为例,系统已经装好字体了,但是没有正常显示箭头,在终端尝试哪个字体能够正常显示.

January 10, 2020 · 1 min · zhangxiaofeng05

命令行下测试服务器外网速度speedtest-cli

speedtest-cli命令 speedtest-cli是一个使用python编写的命令行脚本,通过调用speedtest.net测试上下行的接口来完成速度测试 linux命令大全: https://man.linuxde.net/speedtest-cli github地址: https://github.com/sivel/speedtest-cli 使用方式 自己看作者的README.md 此处列一个简单的方法 wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py chmod +x speedtest-cli 命令 ./speedtest-cli -h 打印帮助信息 ./speedtest-cli --share 测速

January 7, 2020 · 1 min · zhangxiaofeng05

Lrzsz用于小文件的上传下载

百度百科 lrzsz是一款在linux里可代替ftp上传和下载的程序。 使用方法 centos服务器,可直接yum -y install lrzsz 程序会自动安装好,然后如你要下载则sz [找到你要下载的文件] 如果你要上传,则rz 浏览找到你本机要上传的文件。 注意 deepin-terminal:使用命令出现乱码,需要用鼠标右击终端然后点击上传文件、下载文件。

January 7, 2020 · 1 min · zhangxiaofeng05

linux安装并配置nginx

维基百科 Nginx是异步框架的网页服务器,也可以用作反向代理、负载平衡器和HTTP缓存。 安装 官网:https://www.nginx.com/ 官网安装文档:http://nginx.org/en/docs/install.html 安装完成:http://127.0.0.1/ 管理命令 systemctl restart nginx.service 重启 systemctl status nginx.service 查看运行状态 systemctl start nginx.service 启动 systemctl stop nginx.service 关闭 systemctl enable nginx.service 开机自启 systemctl disable nginx.service 关闭开机自启 默认配置文件 以CentOS/7.3.1611、 nginx/1.12.2为例: 默认配置:/etc/nginx/nginx.conf # For more information on configuration, see: # * Official English Documentation: http://nginx.org/en/docs/ # * Official Russian Documentation: http://nginx.org/ru/docs/ #user nginx; user root; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; # Load dynamic modules. See /usr/share/nginx/README.dynamic. include /usr/share/nginx/modules/*.conf; events { worker_connections 1024; } http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-streamo; # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /etc/nginx/conf.d/*.conf; server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /usr/share/nginx/html; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; autoindex on; autoindex_exact_size off; autoindex_localtime on; location / { } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } } # Settings for a TLS enabled server. # # server { # listen 443 ssl http2 default_server; # listen [::]:443 ssl http2 default_server; # server_name _; # root /usr/share/nginx/html; # # ssl_certificate "/etc/pki/nginx/server.crt"; # ssl_certificate_key "/etc/pki/nginx/private/server.key"; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 10m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # # # Load configuration files for the default server block. # include /etc/nginx/default.d/*.conf; # # location / { # } # # error_page 404 /404.html; # location = /40x.html { # } # # error_page 500 502 503 504 /50x.html; # location = /50x.html { # } # } } 自己新加的conf可以放在cd /etc/nginx/conf.d目录下 ...

January 5, 2020 · 2 min · zhangxiaofeng05