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:
| $wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2 | |
| $tar xvf protobuf-2.5.0.tar.bz2 | |
| $cd protobuf-2.5.0 | |
| $./configure CC=clang CXX=clang++ CXXFLAGS='-std=c++11 -stdlib=libc++ -O3 -g' LDFLAGS='-stdlib=libc++' LIBS="-lc++ -lc++abi" | |
| $make -j 4 | |
| $sudo make install | |
| $protoc --version |
| #!/usr/bin/env python | |
| """Simple server using epoll.""" | |
| from __future__ import print_function | |
| from contextlib import contextmanager | |
| import socket | |
| import select | |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)Netcat is like a swiss army knife for geeks. It can be used for just about anything involving TCP or UDP. One of its most practical uses is to transfer files. Non *nix people usually don't have SSH setup, and it is much faster to transfer stuff with netcat then setup SSH. netcat is just a single executable, and works across all platforms (Windows,Mac OS X, Linux).
On the receiving (destination) terminal, run:
nc -l -p 1234 > out.file The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.
Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.
| package main | |
| /* | |
| URL: https://github.com/mccoyst/myip/blob/master/myip.go | |
| URL: http://changsijay.com/2013/07/28/golang-get-ip-address/ | |
| */ | |
| import ( | |
| "net" | |
| "os" |
| package main | |
| import ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "encoding/base64" | |
| "fmt" | |
| "io" | |
| ) |
| #!/bin/bash | |
| # Simple tcp server using netcat | |
| # - depending on the netcat version either use nc -l 5555 or nc -l -p 5555 | |
| # - verify with `telnet locahhost 5555` | |
| # - quit the telnet with `ctrl-]` and then type quit | |
| # - the while loop is there so reopen the port after a client has disconnected | |
| # - supports only one client at a time | |
| PORT=5555; | |
| while :; do nc -l -p $PORT | tee output.log; sleep 1; done |
| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 | |
| import BaseHTTPServer, SimpleHTTPServer | |
| import ssl |