By admin, 27 三月, 2015

初始化账号:

 

git config --global user.name "Your Name"

git config --global user.email "your_email@whatever.com"

git config --global push.default current

复制远程的代码仓库到本地:

 

git clone https://<username>@git.oschina.net/skjy/learngit.git 

cd learngit

从远程仓库获取最新的更新:

git pull

创建一个测试文件test.txt

添加这个文件到git:

git add test.txt

提交修改到本地仓库:

标签

By admin, 27 三月, 2015

在软件收集log的脚本添加类似下面一行。注意:@不是文件名一部分,是文件名前必须添加的一个符号。

curl -F"operation=upload" -F"file=@myfile" http://localhost:9000/index.php

在服务器端添加类似下面的脚本

<?php

标签

By admin, 13 三月, 2015

1. 运行SQL语句授权用户

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password'

2. 编辑/etc/mysql/my.cnf,把bind-address = 127.0.0.1注释掉

3. 重启MySQL服务

service mysql restart

 

如果用户还需要拥有授权其他用户的权限,则需要用下面的命令(把%换成IP),用户要退出重新登录mysql才能生效:

标签

By admin, 12 三月, 2015

clearscreen
make "a 100
make "b 50
 
repeat 360[
  setxy (thing "a) * sin repcount  
    ((thing "b) * cos repcount) - (thing "b)
]

 

标签

By admin, 9 三月, 2015

生成秘钥对(如果已经有就不用再生成了):
a@A:~> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/a/.ssh/id_rsa):
Created directory '/home/a/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/a/.ssh/id_rsa.
Your public key has been saved in /home/a/.ssh/id_rsa.pub.
The key fingerprint is:
3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A
 

标签