随笔分类 -  Linux

摘要:1. 安装pip easy_install pip2. 安装virtualenvwrapper sudo pip install virtualenvwrapper3. 使用virtualenv source /usr/local/bin/virtualenvwrapper.sh mkvir... 阅读全文
posted @ 2014-11-04 01:15 scue 阅读(3737) 评论(0) 推荐(0)
摘要:1 #!/usr/bin/expect -f 2 # sudo apt-get install expect 3 # ./ssh.exp user passwd server 4 set user [lrange $argv 0 0] 5 set pass [lrange $argv 1 1] 6... 阅读全文
posted @ 2014-10-16 14:33 scue 阅读(1851) 评论(0) 推荐(0)
摘要:报错: Failed to complete Gradle Execution Cause: error in opening zip file.原因: 安装gradle失败引起的,往往是上网需要验证或是上网权限没有开通导致的;解决: 1. 先删除原有的残余信息 rm -rf ~/.gra... 阅读全文
posted @ 2014-09-16 14:31 scue 阅读(4235) 评论(0) 推荐(0)
摘要:因为有需要做Android相关的开发工作,很多时候要穿越之后才能做事情;如Android文件加密预研、Android NDK/SDK的下载,都需要使用得到Google;但是穿越之后,访问国内网站就不是那么方便了,所以,写一脚本,在需要的时候直接调用下就可以直达国内网站了; 1 #!/bin/bash... 阅读全文
posted @ 2014-09-07 18:07 scue 阅读(302) 评论(0) 推荐(0)
摘要:1. Linux安装vbox,略过2. 查看已安装扩展插件VBoxManage list extpacks3. 创建一个vm:VBoxManage createvm --name "testvm" --register4. 修改vm属性:VBoxManage modifyvm "testvm" --... 阅读全文
posted @ 2014-09-05 20:43 scue 阅读(1661) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2014-08-19 01:07 scue 阅读(3220) 评论(0) 推荐(0)
摘要:1 dec2hex(){2 printf "%x" $13 }4 5 a=$(dec2hex 2131165531)6 echo $a 阅读全文
posted @ 2014-08-07 23:42 scue 阅读(13669) 评论(1) 推荐(0)
摘要:1 #!/bin/bash - 2 #=============================================================================== 3 # 4 # FILE: hex_change.sh 5 # 6 # ... 阅读全文
posted @ 2014-08-07 00:31 scue 阅读(540) 评论(0) 推荐(0)
摘要:环境:pc1: 10.10.72.1 (network: 10.10.72.0/22)pc2: 地址1: 10.10.136.1 (nework: 10.10.136.0/22) 地址2:11.11.136.1 (network: 11.11.136.0/22)router1: 11.11.13... 阅读全文
posted @ 2014-08-03 00:19 scue 阅读(977) 评论(0) 推荐(0)
摘要:1. 安装软件:sudo apt-get install libvirt0 libvirt-bin libvirt-dev virt-manager qemu-system2. 配置网桥:# interfaces(5) file used by ifup(8) and ifdown(8)auto l... 阅读全文
posted @ 2014-07-20 16:12 scue 阅读(2456) 评论(0) 推荐(0)
摘要:在终端操作:1 sudo dpkg --add-architecture i3862 echo "deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse" |\3 ​sudo ... 阅读全文
posted @ 2014-06-25 16:36 scue 阅读(6343) 评论(0) 推荐(0)
摘要:tmux中默认的shell是zsh,zsh在日常中使用可以协助我们高效地使用shell命令。配置文件默认位置 ~/.tmux.conf,此外,把常用快捷键也附录在这里,方便记忆。# 设置Shellset-option -g default-shell /bin/zsh# 设置复制模式,空格开始选,E... 阅读全文
posted @ 2014-05-03 17:11 scue 阅读(12112) 评论(0) 推荐(0)
摘要:screen 默认使用 bash shell,一般情况下screen只用于android build,tmux则是我的日常使用多终端管理工具。# Default Shellshell "/bin/bash"# show status barhardstatus alwayslastline "%{b... 阅读全文
posted @ 2014-05-03 17:09 scue 阅读(1759) 评论(0) 推荐(0)
摘要:root@192.168.1.105建立隧道: ssh -l root -N -f -R 9103:127.0.0.1:2222 work@11.11.13.17 解析:把本地127.0.0.1:2222的sshd,通过tunnel映射到 work@11.11.13.17的9103端口work@... 阅读全文
posted @ 2014-04-22 12:13 scue 阅读(1124) 评论(0) 推荐(0)
摘要:stackoverflow.com就不介绍了,一种解决方法就是手动分析链接,使用nslookup得到hosts:#stack overflow198.252.206.140 cdn.sstatic.net190.93.246.58 cdn-careers.sstatic.net198... 阅读全文
posted @ 2014-04-20 19:12 scue 阅读(1332) 评论(0) 推荐(0)
摘要:错误信息: $ git push origin master ssh: Could not resolve hostname bitbucket.org: Name or service not known fatal: Could not read from remote repositor... 阅读全文
posted @ 2014-04-20 13:57 scue 阅读(1362) 评论(0) 推荐(0)
摘要:error: Gitlab "bundler: command not found: unicorn_rails"soluton: cd /home/git/gitlab git checkout -b tmp vi Gemfile and Gemfile.l... 阅读全文
posted @ 2014-04-14 10:55 scue 阅读(5970) 评论(0) 推荐(0)
摘要:最近发现在Ubuntu13.10中使用Fn+F9对触摸板的控制操作不灵了;并且在黑夜、外置键盘时,按下这个组合键也很不方便,由此便想到使用命令行来切换触摸板状态;脚本:~/bin/touchpadctrl 1 #!/bin/bash - 2 #=============================================================================== 3 # 4 # FILE: touchpadctrl 5 # 6 # USAGE: ./touchpadctrl 7 # 8 # DESCRIPTIO... 阅读全文
posted @ 2014-03-30 13:32 scue 阅读(1760) 评论(0) 推荐(0)
摘要:适用场景: 下载了一个smarthosts的hosts文件,但hosts文件过旧导致一些ip地址已失效无法访问网络。脚本使用: ./hostsupdate # 直接从 /etc/hosts 中获得需要更新的域名 ./hostsupdate /path/to/hosts # 从指定路径中获得需要更新的域名脚本源码: 1 #!/bin/bash - 2 #=============================================================================== 3 # 4 # FILE: hostupdate 5 # ... 阅读全文
posted @ 2014-03-08 13:49 scue 阅读(3333) 评论(0) 推荐(0)
摘要:vim /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) auto eth0 iface eth0 inet static address 200.200.137.173 netmask 255.255.252.0 gateway 200.200.136.80 dns-nameservers 8.8.8.8 2.2.2.2sudo service networking restart 阅读全文
posted @ 2014-03-05 16:47 scue 阅读(796) 评论(0) 推荐(0)