摘要:
需求 git push时,忽略自定义文件(如:pycache 有数据库密码的配置文件 等等) 方案,编辑 .gitignore # Django **/__pycache__/ 阅读全文
随笔分类 - 系统运维
Django 重新生成表结构
2022-03-20 15:56 by jetwill, 28 阅读, 收藏, 编辑
摘要:
将app内migrations文件夹里除了__init__.py这个文件外的所有文件删除。 登录数据库,找到django_migrations这个表,然后将表内对应的应用app下的migrations记录删除即可。 或者直接删除库 重新执行命令 python manage.py makemigrat 阅读全文
mysql 常用命令
2022-03-20 10:57 by jetwill, 6 阅读, 收藏, 编辑
摘要:
将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, 6 阅读, 收藏, 编辑
摘要:
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, 147 阅读, 收藏, 编辑
摘要:
怎样查看服务器是否在监听本地HTTPS 443端口 # 查看服务器 IP 地址 ip addr # 查看服务器是否在监听本地HTTPS 443端口 netstat -an | grep <IP_ADDR>:443 测试网络连通性,比如查看是否可以连接到某IP地址的某端口 # 使用 netcat 命令 阅读全文
Python中的类变量和成员变量
2022-02-21 21:32 by jetwill, 178 阅读, 收藏, 编辑
摘要:
本文实例形式讲解了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, 20 阅读, 收藏, 编辑
摘要:
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, 3 阅读, 收藏, 编辑
摘要:
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, 77 阅读, 收藏, 编辑
摘要:
--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, 166 阅读, 收藏, 编辑
摘要:
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, 18 阅读, 收藏, 编辑
摘要:
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 阅读全文
golang strings.Split函数
2021-09-28 08:58 by jetwill, 124 阅读, 收藏, 编辑
摘要:
golang strings.Split函数 https://play.studygolang.com/ package main import ( "fmt" "strings" ) func main() { email := "abc@a.com" emailS := strings.Spli 阅读全文
Launch agent by connecting it to the master
2021-09-27 17:20 by jetwill, 55 阅读, 收藏, 编辑
摘要:
Jenkins Node 是 Windows, Jenkins Server 在 Linux C:\JenkinsAgent\start_jenkins_agent.bat java -DSoftKillWaitSeconds=0 -Djava.lang.string.substring.nocop 阅读全文
使用srvany.exe把程序安装成windows服务的方法
2021-09-27 16:13 by jetwill, 28 阅读, 收藏, 编辑
摘要:
http://mazhihui.iteye.com/blog/1294431 https://www.cnblogs.com/liuqiyun/p/9897396.html srvany.exe是什么? srvany.exe是Microsoft Windows Resource Kits工具集的一个 阅读全文
区别对待 .gz 文件 和 .tar.gz 文件
2021-09-22 17:47 by jetwill, 20 阅读, 收藏, 编辑
摘要:
#检测 tar tvf xxx.tar.gz #解压 tar zxvf #检测 gunzip -tv yyy.gz #解压 gunzip yyy.gz 阅读全文
go 使用 sort 对切片进行排序
2021-09-20 10:20 by jetwill, 585 阅读, 收藏, 编辑
摘要:
golang对slice的排序 golang里面需要使用sort包,并且实现几个接口Len, Swap, Less sort 包排序demo 假如现在有个slice 叫做 ids 里面保存的数据类型是int32 package main import ( "fmt" "sort" ) type In 阅读全文
Go数组遍历与排序
2021-09-19 17:51 by jetwill, 558 阅读, 收藏, 编辑
摘要:
遍历数组 Go遍历数组有两种方式 1.按照数组下标进行遍历 2.用range遍历 package main import ( "fmt" ) func main() { // 声明数组 array := [...]string{"red", "yellow", "blue"} // 方法一:直接用数 阅读全文
通过脚本升级PowerShell
2021-09-18 09:05 by jetwill, 39 阅读, 收藏, 编辑
摘要:
Update Powershell through command line https://superuser.com/questions/1287032/update-powershell-through-command-line Run this command : iex "& { $(ir 阅读全文