Skip to content

Instantly share code, notes, and snippets.

View natemurthy's full-sized avatar

Nathan Murthy natemurthy

View GitHub Profile
@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
from grpc.tools import protoc
protoc.main(
(
'',
'--proto_path=.',
'--python_out=.',
'--grpc_python_out=.',
'solver.proto'
)
@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
# Dockerfile.tools
FROM ubuntu
RUN apt-get update && \
apt-get install -y \
openjdk-8-jdk \
wget \
curl \
iputils-ping \
net-tools \
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 \
@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"
)
@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
curl -X POST http://marathon-master:8080/v2/apps -d @python-app.json -H "Content-type: application/json" | python -m json.tool
@natemurthy
natemurthy / build.txt
Created June 13, 2016 04:39
Play dependencies
play-multimodule-demo nate$ sbt test:compile
[info] Loading project definition from /Users/nate/Workspace/github.com/natemurthy/play-multimodule-demo/project
[info] Updating {file:/Users/nate/Workspace/github.com/natemurthy/play-multimodule-demo/project/}play-multimodule-demo-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.10/sbt_0.13/2.4.6/jars/sbt-plugin.jar ...
[info] [SUCCESSFUL ] com.typesafe.play#sbt-plugin;2.4.6!sbt-plugin.jar (4806ms)
[info] downloading https://repo1.maven.org/maven2/com/typesafe/play/sbt-routes-compiler_2.10/2.4.6/sbt-routes-compiler_2.10-2.4.6.jar ...
[info] [SUCCESSFUL ] com.typesafe.play#sbt-routes-compiler_2.10;2.4.6!sbt-routes-compiler_2.10.jar (4253ms)
[info] downloading https://repo1.maven.org/maven2/com/typesafe/play/sbt-run-support_2.10/2.4.6/sbt-run-support_2.10-2.4.6.jar ...
[info] [SUCCESSFUL ] com.typesafe.play#sbt-run-support_2.10;2.4.6!sbt-run
{
"id": "python-app",
"cmd": "python3 -m http.server 8080",
"cpus": 0.5,
"mem": 32.0,
"container": {
"type": "DOCKER",
"docker": {
"image": "python:3",
"network": "BRIDGE",