Merge pull request #96 from LCTT/master

更新至2015年12月26日
This commit is contained in:
struggling 2015-12-26 16:14:41 +08:00
commit 041258e82d
3 changed files with 164 additions and 86 deletions

View File

@ -1,86 +0,0 @@
Turn Tor socks to http
================================================================================
![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/12/tor-593x445.jpg)
For using Tor service you can use diffrent tools like Tor browser, Foxyproxy and other things, some download managers such as Wget or Aria2 cant get Tor socks directly and start downloading anonymously with that so we need some tools to change Tor socks to http and then download with that.
**Note** : This tutorial is under Debian distrobutions and in other distrobutions may be diffrent so if your distro is Debian base and you have configured Tor correctly go a head !
**Polipo** : This service uses 8123 Port and 127.0.0.1 IP, use following command to install Polipo on your computer :
sudo apt install polipo
Now use this command to go in Polipo config file:
sudo nano /etc/polipo/config
Add the following lines to the end of the file :
proxyAddress = "::0"
allowedClients = 192.168.1.0/24
socksParentProxy = "localhost:9050"
socksProxyType = socks5
Restart the Polipo service with this command :
sudo service polipo restart
Now Polipo is ready ! do what ever you like in anonymous world ! as example of how using it :
pdmt -l "link" -i 127.0.01 -p 8123
With command above, PDMT ( Persian Download Manager Terminal ) will download your file anonymously.
**Proxychains** : In this service you can set Tor or Lantern proxy to turn socks too but in usage its a little diffrent with Polipo and Privoxy because you dont need to use any port ! for installing that use following command :
sudo apt install proxychains
Open config file with this command :
sudo nano /etc/proxychains.conf
Now add the following code to the end of text, this code is Tor port and Ip :
socks5 127.0.0.1 9050
If you put “proxychains” word before a command in terminal and run it, it would run by Tor proxy :
proxychains firefoxt
proxychains aria2c
proxychains wget
**Privoxy** : Privoxy uses 8118 port and its easy to run first install privoxy package :
sudo apt install privoxy
We should change the config file now :
sudo nano /etc/pivoxy/config
Add the following lines to end of the file :
forward-socks5 / 127.0.0.1:9050 .
forward-socks4a / 127.0.0.1:9050 .
forward-socks5t / 127.0.0.1:9050 .
forward 192.168.*.*/ .
forward 10.*.*.*/ .
forward 127.*.*.*/ .
forward localhost/ .
Restart the service :
sudo service privoxy restart
Service is ready ! port is 8118 and Ip is 127.0.0.1 use it and enjoy from it !
--------------------------------------------------------------------------------
via: http://www.unixmen.com/turn-tor-socks-http/
作者:[Hossein heydari][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.unixmen.com/author/hossein/

View File

@ -0,0 +1,78 @@
What are the best plugins to increase productivity on Emacs
================================================================================
Over a year ago now, I went looking for the best plugins to [turn Vim into a full-fledged IDE][1]. Interestingly, a lot of the comments on that post were about how Emacs already has most of these plugins built in, and was already a great IDE. Although I can only agree about Emacs' incredible versatility, it is still not the ultimate editor when it comes out of the box. Thankfully, its vast plugin library is here to fix that. But among the plethora of options available to you, it is sometimes hard to know where to start. So for now, let me try to assemble a short list of the indispensable plugins to increase your productivity while using Emacs. Although I am heavily geared towards programming related productivity, most of these plugins would be useful to anyone for any usage.
### 1. Ido-mode ###
![](https://c2.staticflickr.com/6/5718/23311895573_c1fb34337c_c.jpg)
Maybe one of the most useful plugin for beginners, Ido stands for interactively do. It replaces most of the dry prompts with a fancy character matching menu. For example, it will replace the normal prompt to open a file with a list of all the files in the current directory. Type any string, and Ido will try to match it with the most appropriate file. It makes it really easy to visualize your actions, and also to quickly get through a folder where all files are named with the same prefix.
### 2. Smex ###
![](https://c2.staticflickr.com/2/1517/23310442314_2a22a60c34_c.jpg)
Not the most famous one, but a good place to complete what Ido-mode started: Smex can be a fancy replacement to the normal 'M-x' prompt, with a heavy inspiration from Ido-mode. It brings the same interactive search for the commands you would normally have to type after calling 'M-x'. It is simple and efficient, and a great way to save those additional few fractions of a second you normally need.
### 3. Auto Complete ###
![](https://c2.staticflickr.com/6/5794/23643004900_3042f77952_c.jpg)
Before knowing the existence of this plugin, I spent half of my time on Emacs pressing M-/ to complete my words. Now, I have a fancy pop-up to do it for me. There is not much more to say about it, except that we all need it.
### 4. YASnippet ###
![](https://c2.staticflickr.com/2/1688/23830403072_0d8df6ef4c_b.jpg)
This one is really for the coders. There is always some piece of code that we feel we use all the time. For me, it's 'var_dump(...); exit;' to debug PHP. After a while of typing it over and over, it just occurred to me that I could have it pre-recorded and easily accessible as a snippet of code. With YASnippets, it's easy to import snippet files or make your own. After that, a simple press on the tabulation key will expand a small keyword into a chunk of pre-written code easy to navigate through and modify.
### 5. Org-mode ###
![](https://c2.staticflickr.com/6/5687/23570808789_d683c949e4.jpg)
For disclaimer, I have only recently started using Org-mode. But it has already blown me away. From the hundreds of written pieces I have seen around, Org-mode can change your life. The idea behind it is simple: it is a mode that simplifies note taking while keeping a plain text format, making it easy to navigate through lists of tasks and various data, and perform operations such as filtering by priority or due date, or setting a recurrence. Yet, from this simple idea, you can accomplish a lot, and it is easy to get overwhelmed with all the options. Rather than a long explanation, I urge you to go through [available tutorials][2], watch a lot of videos, and see by yourself how powerful Org-mode is.
### 6. Helm ###
![](https://c2.staticflickr.com/2/1489/23310442334_5e6db22b79_c.jpg)
Some love it, but others are not such a big fan of it. I am part of the later. But with such a huge following, it is impossible to avoid it. Helm aims to transform your Emacs experience completely. Simply described, Helm is a framework that will help you find a file or a command quickly from within Emacs. Based on your input, it will try to use word completion to guide you to the action you have in mind. The feeling is a bit weird at first, but for some, Helm is a religion of its own. Although I am not its fan, I do appreciate helm-occur which a great tool to search for strings in a large document as it shows all occurrences in a separate buffer, making it easy to navigate through them. If you are looking for a quick demo to understand what Helm can do, I recommend [this post][3].
### 7. ace-jump-mode ###
![](https://c2.staticflickr.com/2/1710/23856168871_6df1faa565_c.jpg)
Another plugin with a big following that I am trying to get on board with is ace-jump-mode. Master this plugin, and you will be promised to transcend the usage of a mouse. Simply described, by triggering ace-jump-mode with a shortcut of your choice, you will be prompted for a character. Enter one, and all words starting with that character will be highlighted with a unique letter. Enter one of the letters on screen, and your cursor will jump straight to the word it is highlighting. I have to admit that it is pretty hard to get the reflex to use it, but once you have it, it will increase your movement speed in a document by a lot.
### 8. find-file-in-project ###
![](https://c2.staticflickr.com/2/1492/23570808809_96ec8454a9_c.jpg)
If you like Sublime text and its very handy 'Ctrl-p' fuzzy search to open any file in a project, then you will love find-file-in-project (or ffip). After setting it up by declaring the root of your version control folder, you can summon easily a cool text bar that quickly scans and searches through your code base for a matching file based on the name you input. I like to have it bound to the F6 key on my keyboard. It is simple and very handy if you do not know the complicate directory structure from the top of your head.
### 9. Flymake ###
![](https://c2.staticflickr.com/6/5708/23310442354_cbba657ed3.jpg)
For IDE lovers, I think that syntax checker is one of the most powerful features. It is great for beginners and handy for tired programmers. And thanks to Flymake, Emacs users can enjoy it too. Since I work in PHP a lot, Flymake does not need any extra configuration. As I write my code, it will automatically check my code and highlight any line that contains a problem. For compiled languages, Flymake will look for a Makefile that it will use to check your code. Absolutely magical.
### 10. electric-pair ###
Last, but not least, electric-pair is one of the simplest yet most powerful plugin in my opinion. It just automatically closes whatever parenthesis or bracket you open. It doesn't look like much at first, but trust me. After struggling for the hundredth time to find that matching parenthesis, you will be glad to have a plugin to ensure that all your expressions are balanced.
To conclude, Emacs is a fantastic tool. Probably not a shocker. Try these plugins and watch as your productivity goes through the roof. This list is of course not exhaustive at all. If you want to bring your contribution, feel free to do so in the comments. I am myself always looking for new plugins to try and new ways to experience Emacs.
--------------------------------------------------------------------------------
via: http://xmodulo.com/best-plugins-to-increase-productivity-on-emacs.html
作者:[Adrien Brochard][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/adrien
[1]:http://xmodulo.com/turn-vim-full-fledged-ide.html
[2]:http://orgmode.org/worg/org-tutorials/
[3]:http://tuhdo.github.io/helm-intro.html

View File

@ -0,0 +1,86 @@
将Tor socks转换成http
================================================================================
![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/12/tor-593x445.jpg)
使用tor服务你可以使用不同的工具像Tor浏览器、Foxyproxy和其他事情有些下载管理器像wget和aria2不能直接直接使用tor socks开始匿名下载因此我们需要一些工具来将tor socks转换成http代理这样就能用它来下载了。
**注意**本教程基于Debian下其他发行版会有些不同因此如果你的发行版是基于Debian的就可以直接使用下面的配置了。
**Polipo** : 这个服务会使用8123端口和127.0.0.1的IP使用下面的命令来在计算机上安装Polipo
sudo apt install polipo
现在使用这个命令打开Polipo的配置文件
sudo nano /etc/polipo/config
在文件最后加入下面的行:
proxyAddress = "::0"
allowedClients = 192.168.1.0/24
socksParentProxy = "localhost:9050"
socksProxyType = socks5
用下面的命令来重启Polipo
sudo service polipo restart
现在Polipo已经安装好了在匿名的世界里做你想做的吧下面是使用的例子
pdmt -l "link" -i 127.0.01 -p 8123
用上面的命令PDMTPersian下载器会匿名地下载你的文件。
**Proxychains** : 在此服务中你可以设置使用tor或者Lantern代理但是在使用上它和Polipo和Privoxy有点不同它不需要使用任何端口使用下面的命令来安装
sudo apt install proxychains
用这条命令来打开配置文件:
sudo nano /etc/proxychains.conf
现在添加下面的代码到文件底部这里是tor的端口和IP
socks5 127.0.0.1 9050
如果你在命令的前面加上“proxychains”并运行它就能通过tor代理来运行
proxychains firefoxt
proxychains aria2c
proxychains wget
**Privoxy** : Privoxy使用8118端口并且首次可以很轻松地通过privoxy包来安装
sudo apt install privoxy
我们现在要修改配置文件:
sudo nano /etc/pivoxy/config
在文件底部加入下面的行:
forward-socks5 / 127.0.0.1:9050 .
forward-socks4a / 127.0.0.1:9050 .
forward-socks5t / 127.0.0.1:9050 .
forward 192.168.*.*/ .
forward 10.*.*.*/ .
forward 127.*.*.*/ .
forward localhost/ .
重启服务:
sudo service privoxy restart
服务已经好了端口是8118IP是127.0.0.1,就尽情使用吧!
--------------------------------------------------------------------------------
via: http://www.unixmen.com/turn-tor-socks-http/
作者:[Hossein heydari][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.unixmen.com/author/hossein/