Skip to content

Instantly share code, notes, and snippets.

View natemurthy's full-sized avatar

Nathan Murthy natemurthy

View GitHub Profile
@natemurthy
natemurthy / golang-tls.md
Created July 16, 2016 20:28 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
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)
openssl ecparam -genkey -name secp384r1 -out server.key
@natemurthy
natemurthy / client.go
Created July 16, 2016 20:28 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
description "play-app upstart script"
start on runlevel 2
setuid play-app
script
sleep 2s
cd /opt/play-app
rm -f RUNNING_PID
PLAY_JVM_OPTIONS="-J-server -J-verbose:gc \
# Dockerfile.tools
FROM ubuntu
RUN apt-get update && \
apt-get install -y \
openjdk-8-jdk \
wget \
curl \
iputils-ping \
net-tools \
@natemurthy
natemurthy / 23Feb2017-sf-micro-meetup-demo.sh
Last active January 19, 2023 14:34
Demo of chroot and jail in FreeBSD
############################
# chroot demo #
############################
pwd # outside container
mkdir newroot
mkdir -p newroot/{bin,dev,lib,libexec,sbin}
# copy bins
from grpc.tools import protoc
protoc.main(
(
'',
'--proto_path=.',
'--python_out=.',
'--grpc_python_out=.',
'solver.proto'
)
@natemurthy
natemurthy / CheckHealth.md
Created October 7, 2017 22:26
Debugging deoplete.nvim

health#deoplete#check

deoplete.nvim

  • SUCCESS: has("nvim") was successful
  • SUCCESS: has("python3") was successful
  • INFO: If you're still having problems, try the following commands: $ export NVIM_PYTHON_LOG_FILE=/tmp/log $ export NVIM_PYTHON_LOG_LEVEL=DEBUG $ nvim
$ pip install numpy
Collecting numpy
Downloading numpy-1.13.3.zip (5.0MB)
100% |████████████████████████████████| 5.0MB 287kB/s
Building wheels for collected packages: numpy
Running setup.py bdist_wheel for numpy ... error
Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Jcd9jL/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpwKM5a8pip-wheel- --python-tag cp27:
Running from numpy source directory.
blas_opt_info:
blas_mkl_info:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-numpy latest 9eaa351cd5d9 6 minutes ago 529MB
alpine-numpy latest 28e2d9ea2be5 21 minutes ago 285MB
ubuntu latest 747cb2d60bbe 2 weeks ago 122MB
python 2.7-alpine3.6 823e7055e03f 3 days ago 68.5MB

Keybase proof

I hereby claim:

  • I am natemurthy on github.
  • I am namurthy (https://keybase.io/namurthy) on keybase.
  • I have a public key ASBn9ovapwNrXiuonmlHZY5b0A8LCe8luCi5ZgnektE7Vgo

To claim this, I am signing this object: