Changes

Jump to navigation Jump to search
300 bytes added ,  11:16, 28 July 2021
m
no edit summary
Line 1: Line 1:  +
=== Python ===
 +
<syntaxhighlight lang="bash">
 +
echo '{"test1": 1, "test2": "win"}' | python -m json.tool
 +
</syntaxhighlight>
 +
 +
 +
 +
 
[https://github.com/ddopson/underscore-cli underscore-cli]<br />
 
[https://github.com/ddopson/underscore-cli underscore-cli]<br />
== Requirements ==  
+
==Description==
 +
Underscore provides a CLI JSON Beautifier this document describes how to install underscore or any other npm package with proxy and without it.
 +
 
 +
==Requirements==  
 
npm<br />
 
npm<br />
   −
== Install with internet access ==
+
==Install with internet access==
 
  curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh
 
  curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh
 
  sudo bash nodesource_setup.sh
 
  sudo bash nodesource_setup.sh
 
  sudo apt install nodejs
 
  sudo apt install nodejs
   −
== Install behind Proxy SOCS5 ==
+
==Install behind Proxy SOCS5==
 
  <nowiki>proxychains curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh
 
  <nowiki>proxychains curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh
proxychains sudo bash nodesource_setup.sh
+
proxychains sudo bash nodesource_setup.sh
sudo proxychains apt install nodejs</nowiki>
+
sudo proxychains apt install nodejs</nowiki>
    
NPM does not support Socks5 proxy so you will have to install an HTTP proxy (polipo) and connect it to your socs5 proxy
 
NPM does not support Socks5 proxy so you will have to install an HTTP proxy (polipo) and connect it to your socs5 proxy
 
  sudo proxychains apt install polipo
 
  sudo proxychains apt install polipo
 
/etc/polipo/config
 
/etc/polipo/config
  <nowiki>socksParentProxy = 10.0.8.xxx:1337
+
  <nowiki>socksParentProxy = 20.1.40.109:1337
socksProxyType = socks5
+
socksProxyType = socks5
proxyAddress = ::0
+
proxyAddress = ::0
proxyPort = 8123</nowiki>
+
proxyPort = 8123</nowiki>
    
  sudo service polipo restart
 
  sudo service polipo restart
    
Start your SOCKS5 proxy:
 
Start your SOCKS5 proxy:
   ssh -fN -D1337 user@server
+
   ssh -fN -D 20.1.40.109:1337 user@server
    
Setup npm to use Proxy
 
Setup npm to use Proxy

Navigation menu