代码改变世界

随笔分类 -  系统运维

Fix for PowerShell Script Not Digitally Signed

2023-01-16 18:06 by jetwill, 38 阅读, 收藏, 编辑
摘要: When you run a .ps1 PowerShell script you might get the message saying “.ps1 is not digitally signed. The script will not execute on the system.” To f 阅读全文

curl equivalent of wget

2023-01-09 18:17 by jetwill, 12 阅读, 收藏, 编辑
摘要: # https://www.thegeekstuff.com/2012/07/wget-curl/ # https://linuxpip.org/curl-failed-to-verify-the-legitimacy-of-the-server/ wget xxxx.yyy equivalent 阅读全文

使用git push时, 自动忽略__pycache__文件

2022-03-20 15:59 by jetwill, 506 阅读, 收藏, 编辑
摘要: 需求 git push时,忽略自定义文件(如:pycache 有数据库密码的配置文件 等等) 方案,编辑 .gitignore # Django **/__pycache__/ 阅读全文

Django 重新生成表结构

2022-03-20 15:56 by jetwill, 176 阅读, 收藏, 编辑
摘要: 将app内migrations文件夹里除了__init__.py这个文件外的所有文件删除。 登录数据库,找到django_migrations这个表,然后将表内对应的应用app下的migrations记录删除即可。 或者直接删除库 重新执行命令 python manage.py makemigrat 阅读全文

mysql 常用命令

2022-03-20 10:57 by jetwill, 27 阅读, 收藏, 编辑
摘要: 将mysql目录下bin目录中的mysql.exe放到C:\WINDOWS下,可以执行以下命令 连接:mysql -h主机地址 -u用户名 -p用户密码 (注:u与root可以不用加空格,其它也一样) 或 mysql -h主机地址 -u用户名 -p 断开:exit (回车) 创建授权:grant s 阅读全文

Oracle – Quick Tip – Run OS Commands Within SQL*Plus

2022-03-09 11:01 by jetwill, 35 阅读, 收藏, 编辑
摘要: Oracle – Quick Tip – Run OS Commands Within SQL*Plus SQL> HO[ST] [command] # https://docs.oracle.com/cd/B19306_01/server.102/b14357/ch12026.htm # http 阅读全文

怎样查看服务器是否在监听本地HTTPS 443端口

2022-03-03 09:51 by jetwill, 890 阅读, 收藏, 编辑
摘要: 怎样查看服务器是否在监听本地HTTPS 443端口 # 查看服务器 IP 地址 ip addr # 查看服务器是否在监听本地HTTPS 443端口 netstat -an | grep <IP_ADDR>:443 测试网络连通性,比如查看是否可以连接到某IP地址的某端口 # 使用 netcat 命令 阅读全文

Python中的类变量和成员变量

2022-02-21 21:32 by jetwill, 2476 阅读, 收藏, 编辑
摘要: 本文实例形式讲解了python的类变量和成员变量用法,对于Python程序设计有一定的参考价值。分享给大家供大家参考。具体如下: 先看看下面这段代码: class TestClass(object): val1 = 100 def __init__(self): self.val2 = 200 de 阅读全文

Notepad++ Search Result Window disappeared

2022-02-10 10:16 by jetwill, 156 阅读, 收藏, 编辑
摘要: https://stackoverflow.com/questions/46632070/notepad-search-window-disappeared The issue seems happens if I change monitors configuration , e.g. if I 阅读全文

Oracle - How To Query If A User Has Execute Privilege on DBMS_LOB

2022-02-07 11:16 by jetwill, 14 阅读, 收藏, 编辑
摘要: select grantee, owner, table_name, grantor, privilege, type from dba_tab_privs where table_name='DBMS_LOB'; select owner, object_type, object_name, st 阅读全文

查询 Oralce 某 schema 所拥有的权限

2021-11-03 21:22 by jetwill, 257 阅读, 收藏, 编辑
摘要: --https://dba.stackexchange.com/questions/14901/oracle-list-users-with-access-to-certain-tables select lpad(' ', 2*level) || granted_role "User, his r 阅读全文

怎样用命令行导入注册表 .reg 文件

2021-10-12 17:34 by jetwill, 686 阅读, 收藏, 编辑
摘要: https://stackoverflow.com/questions/49676660/how-to-run-the-reg-file-using-powershell Get-Command reg CommandType Name Version Source Application reg. 阅读全文

Bash 取字符串的最后 N 个字符 - ${str:0-N:LENGTH}

2021-10-11 10:49 by jetwill, 99 阅读, 收藏, 编辑
摘要: Bash 取字符串的最后 N 个字符: ${str:0-N:LENGTH} or ${str:0-N} https://tldp.org/LDP/abs/html/string-manipulation.html > file_name=/app/xxx/yyy/zzz.20210915 > ech 阅读全文