会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
idlewith
个人博客:https://idlewith.com/,欢迎访问
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
21
下一页
2018年9月23日
Git push without username and password
摘要: ``` ssh-keygen -t rsa paste key to github website after config ssh key git remote set-url origin git@github.com:username/repo.git ```
阅读全文
posted @ 2018-09-23 14:32 idlewith
阅读(186)
评论(0)
推荐(0)
2018年9月21日
use iptables instead of firewalld
摘要: 1 stop firewalld 2 install iptables 3 accept 80, 22, 8080 4 drop attack ip 5 limit speed 5 save and restart iptables
阅读全文
posted @ 2018-09-21 11:49 idlewith
阅读(160)
评论(0)
推荐(0)
2018年9月20日
ssh public key to login server
摘要: /etc/ssh/sshd_config generate client public and private key Step 3 prevent user from login by password /etc/sshd/sshd_config modify mode
阅读全文
posted @ 2018-09-20 23:51 idlewith
阅读(163)
评论(0)
推荐(0)
2018年9月19日
use paramiko to connect remote server and execute command
摘要: ``` #!/usr/bin/env python import sys, paramiko hostname = '' password = '' command = 'ls' username = "" port = 22 try: client = paramiko.SSHClient() client.load_system_host_keys() clie...
阅读全文
posted @ 2018-09-19 23:32 idlewith
阅读(118)
评论(0)
推荐(0)
2018年9月18日
protect golang source code
摘要: ``` go build ldflags " s w” [
阅读全文
posted @ 2018-09-18 23:01 idlewith
阅读(287)
评论(0)
推荐(0)
2018年9月13日
adjust jedi vim to python2 and python3
摘要: ``` let py_version = system('python V 2 &1 | grep Po " (?
阅读全文
posted @ 2018-09-13 11:30 idlewith
阅读(189)
评论(0)
推荐(0)
2018年9月11日
install vim plugin local file offline
摘要: ``` download github file.zip cd file git init git add . git commit -m "init" set rtp+=$HOME/.vim/bundle/Vundle.vim/ call vundle#begin('$HOME/.vim/bundle/') Plugin 'file://D:/mtl/vim/jedi-vim' cal...
阅读全文
posted @ 2018-09-11 13:25 idlewith
阅读(589)
评论(0)
推荐(0)
add swap file if you only have 1G RAM
摘要: ``` dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 mkswap /swapfile1 swapon /swapfile1 vi /etc/fstab # edit /etc/fstab file, add the following line /swapfile1 none swap sw 0 0 # save and qui...
阅读全文
posted @ 2018-09-11 12:33 idlewith
阅读(234)
评论(0)
推荐(0)
2018年9月7日
datatables hyperlink in td
摘要: ``` $(document).ready(function () { $('#example').DataTable({ "ajax": "http://127.0.0.1:8080/api/resources/", "columns": [ { "data": "name", ...
阅读全文
posted @ 2018-09-07 20:07 idlewith
阅读(134)
评论(0)
推荐(0)
django rest framework custom json format
摘要: ``` class ResourceSetView(viewsets.ModelViewSet): queryset = models.Resources.objects.all() serializer_class = serializers.ResourceSerializer def list(self, request, *args, **kwargs): ...
阅读全文
posted @ 2018-09-07 19:15 idlewith
阅读(136)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
21
下一页
公告