Skip to content

Instantly share code, notes, and snippets.

Running On My Way

Larry Liu g10guang

Running On My Way
View GitHub Profile
rajkrrsingh / Google protobuf installation on Mac
Created Nov 27, 2016
Steps to Install google protobuf on Mac
View Google protobuf installation on Mac
$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
evantoli /
Last active Feb 28, 2021
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

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:

dtoma /
Last active Jan 10, 2021
epoll tcp server in python
#!/usr/bin/env python
"""Simple server using epoll."""
from __future__ import print_function
from contextlib import contextmanager
import socket
import select
denji /
Last active Mar 1, 2021 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository:

Generate private key (.key)
# 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)
lyoshenka /
Last active Feb 12, 2021
How to setup Ngrok with a self-signed SSL cert


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, you'll need a record for that and for *

Different Operating Systems

jniltinho / myip.go
Created Mar 26, 2014
Get My IP Golang
View myip.go
package main
import (
manishtpatel / main.go
Last active Feb 11, 2021
GoLang Encrypt string to base64 and vice versa using AES encryption.
View main.go
package main
import (
phuesler /
Last active Jan 23, 2021
Simple tcp server using netcat
# 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
while :; do nc -l -p $PORT | tee output.log; sleep 1; done
# taken from
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname