You may need to configure a proxy server if you're having trouble cloning
or fetching from a remote repository or getting an error
like unable to access '...' Couldn't resolve host '...'.
Consider something like:
| First run polipo with parent proxy set to Shadowsocks: | |
| apt-get install polipo | |
| service polipo stop | |
| polipo socksParentProxy=localhost:1080 | |
| Then you can play with the HTTP proxy: | |
| http_proxy=http://localhost:8123 apt-get update |
| # git | |
| git config http.proxy http://localhost:8123 # for current directory | |
| git config --global http.proxy http://localhost:8123 # global config | |
| # choco | |
| choco config set proxy http://10.200.241.222:8118 |
| # Plain Ol' Node | |
| node --max-old-space-size=1024 app.js # increase to 1gb | |
| node --max-old-space-size=2048 app.js # increase to 2gb | |
| node --max-old-space-size=3072 app.js # increase to 3gb | |
| node --max-old-space-size=4096 app.js # increase to 4gb | |
| node --max-old-space-size=5120 app.js # increase to 5gb | |
| node --max-old-space-size=6144 app.js # increase to 6gb | |
| # For pm2 | |
| pm2 start app.js --node-args="--max-old-space-size=1024" # increase to 1gb |
| #!/bin/sh | |
| # Updated for foo feature | |
| # | |
| # GPIO numbers should be from this list | |
| # 0, 1, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 21, 22, 23, 24, 25 | |
| # Note that the GPIO numbers that you program here refer to the pins | |
| # of the BCM2835 and *not* the numbers on the pin header. | |
| # So, if you want to activate GPIO7 on the header you should be | |
| # using GPIO4 in this script. Likewise if you want to activate GPIO0 |
| [Unit] | |
| Description=Share local port(s) with ngrokd | |
| After=syslog.target network.target | |
| [Service] | |
| PrivateTmp=true | |
| Type=simple | |
| Restart=always | |
| RestartSec=1min | |
| StandardOutput=null |
| #! /bin/sh | |
| PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
| NAME=nginx | |
| NGINX_BIN=/usr/local/nginx/sbin/$NAME | |
| CONFIGFILE=/usr/local/nginx/conf/$NAME.conf | |
| PIDFILE=/usr/local/nginx/logs/$NAME.pid | |
| if [ -s /bin/ss ]; then | |
| StatBin=/bin/ss | |
| else |
| Get_Dist_Version() | |
| { | |
| if [ -s /usr/bin/python3 ]; then | |
| eval ${DISTRO}_Version=`/usr/bin/python3 -c 'import platform; print(platform.linux_distribution()[1])'` | |
| elif [ -s /usr/bin/python2 ]; then | |
| eval ${DISTRO}_Version=`/usr/bin/python2 -c 'import platform; print platform.linux_distribution()[1]'` | |
| fi | |
| if [ $? -ne 0 ]; then | |
| Install_LSB | |
| eval ${DISTRO}_Version=`lsb_release -rs` |
| #!/bin/sh | |
| # on ubuntu: need some utils & dev libs | |
| sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev | |
| # compile nginx | |
| cd /tmp | |
| curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz | |
| cd nginx* | |
| ./configure --with-http_ssl_module --with-http_dav_module \ |
| #!/bin/bash | |
| pm2 describe appname > /dev/null | |
| RUNNING=$? | |
| if [ "${RUNNING}" -ne 0 ]; then | |
| pm2 start ./deploy/development.yml | |
| else | |
| pm2 restart appname | |
| fi; |